Constructor
# <Input />
Input component
Parameters:
| Name | Type | Description |
|---|---|---|
props |
object | component props passed |
type |
string | input type |
label |
string | input label |
value |
string | input value |
onCHange |
function | input onChange callback |
errorMessage |
string | input error message when invalid |
input element
jsx
Methods
# inner isInvalid(valid, touched, shouldValidate) → {boolean}
A function to validate input
Parameters:
| Name | Type | Description |
|---|---|---|
valid |
boolean | checks is value is valid |
touched |
boolean | checks if input was changed |
shouldValidate |
boolean | checks if input shoud be validated |
boolean