User-interactive component.
Input
should be wrapped into FormGroup
Input
contains html <input />
element. All props for <input />
are valid for Input
.
Own props:
errorClassName
- class that applies when model attribute is invalid. By default -has-error
.focusClassName
- class that applies when user-interactive element have focus. By default -has-focus
.valueClassName
- class that applies when model attribute have value. By default -has-value
.nativeRef
- callback for Reactref
.Optional
<Form
onSubmit={async (values) => await someRequest(values)}
validator={new SchemaValidator(ExampleSchema)}
errorParser={(error) => myCustomParser(error)}
>
<FormGroup attribute="surname" validateOn="blur">
<Input />
</FormGroup>
</Form>