npm final-form 4.0.0
v4.0.0

latest releases: 4.20.10, 4.20.9, 4.20.8...
6 years ago

⚠️ BREAKING CHANGE ⚠️

It's fairly minor, but when you register a field now, rather than provide a field-level validation function, now you must provide a function that returns the validation function. The migration is pretty trivial:

v3.x.x

form.registerField(
  'firstName',
  fieldState => { // do something with field state },
  fieldSubscription,
  {
    validate: value => { // return error }
  }
)

v4.x.x

form.registerField(
  'firstName',
  fieldState => { // do something with field state },
  fieldSubscription,
  {
    validate: () => value => { // return error }
//            ^^^^^--- ADD THIS 👀
  }
)

Don't miss a new final-form release

NewReleases is sending notifications on new releases.