github redux-form/redux-form v6.3.0

latest releases: v8.3.10, v8.3.9, v8.3.8...
7 years ago

🎉 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 ]}/> // <------------

👉 👉 See Demo 👈 👈 👀

Bug Fixes

  • Fixed deep equal equality check to not treat "1." and 1 as equal. #2209
  • Fixed bug when using seamless-immutable. #2219

Don't miss a new redux-form release

NewReleases is sending notifications on new releases.