Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
feat(FormInput): add validation properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nating committed Dec 7, 2018
1 parent b277c21 commit 0a96d28
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/Form/FormInput.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ type FormStyle = {|
+placeholder?: string,
+name?: string,
+value?: string | number,
+min?: string | number,
+max?: string | number,
+minlength?: string | number,
+maxlength?: string | number,
+disabled?: boolean,
+readOnly?: boolean,
+autoFocus?: boolean,
+required?: boolean,
+checked?: boolean,
|};

Expand Down Expand Up @@ -67,6 +72,10 @@ function FormInput(props: Props): React.Node {
error,
placeholder,
value,
min,
max,
minlength,
maxlength,
checked,
onChange,
onMouseEnter,
Expand All @@ -84,6 +93,7 @@ function FormInput(props: Props): React.Node {
disabled,
readOnly,
autoFocus,
required,
label,
} = props;
const type = props.type || "text";
Expand All @@ -108,9 +118,14 @@ function FormInput(props: Props): React.Node {
type,
placeholder,
value,
min,
max,
minlength,
maxlength,
disabled,
readOnly,
autoFocus,
required,
onChange,
onMouseEnter,
onMouseLeave,
Expand Down

0 comments on commit 0a96d28

Please sign in to comment.