⚠️ 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 👀
}
)