Skip to content
Snippets Groups Projects
Commit a0894513 authored by Alf Eaton's avatar Alf Eaton
Browse files

Fix ValidatedField doc

parent af89e1f4
No related branches found
No related tags found
No related merge requests found
A form field that displays the results of validation.
```js
<ValidatedField error="There was an error">
<input/>
</ValidatedField>
const { reduxForm } = require('redux-form');
const ValidatedFieldForm = reduxForm({
form: 'validated-field-error',
onChange: values => console.log(values)
})(ValidatedField);
<ValidatedFieldForm
name="error"
validate={() => 'Required'}
component={input => <input {...input}/>}
/>
```
```js
<ValidatedField warning="There was a warning">
<input/>
</ValidatedField>
const { reduxForm } = require('redux-form');
const ValidatedFieldForm = reduxForm({
form: 'validated-field-warning',
onChange: values => console.log(values)
})(ValidatedField);
<ValidatedFieldForm
name="warning"
warn={() => 'Expected'}
component={input => <input {...input}/>}
/>
```
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment