🎉 Field-Level Validation 🎉
This has been a source of conflict for users of this library since its release. To some people, it makes sense to write a validation function to validate the entire form, and for others, it makes more sense to write individual validation functions for each field. Those of you favoring the latter are in luck! You can now do things like:
const required = value => value == null ? 'Required' : undefined
const minPasswordLength = value => value && value.length < 3 ? 'Must be longer' : undefined
<Field name="username"
component="input"
type="text"
validate={required}/> // <------------
<Field name="password"
component="input"
type="password"
validate={[ required, minPasswordLength ]}/> // <------------