⚠️ Important Changes
Schema Behavior Change
Previously vee-validate treated schemas loosly, meaning if there are validations for fields that were not rendered with Field
or useField
it will ignore the errors for those fields. This was found unexpected from the few reports I got.
In 4.4.x
and onwards, vee-validate will treat schemas as the source of truth and will no longer ignore any errors generated by the validation schema.
There are a few side effects to this change:
- You can now set custom form errors with
setErrors
orsetFieldError
for non-existing fields and it will affect the form's validity. - You can set custom values with
setValues
orsetFieldValue
for non-existing fields. - Defining a schema for multi-step forms will require partitioning them into separate ones per step
The first two side effects should not be breaking in your apps unless you have typos when setting fields values/errors
The official examples for multi-step forms will be updated in the docs to reflect these changes
Depreactions
handleInput
is now marked for deprecation, you may still use it but it will be removed in the next minor release, instead usehandleChange(event, shouldValidate = false)
as an alternative.valueProp
was renamed tocheckedValue
to better reflect its usage, you may still use the old prop name but it will be removed in the next minor release.