github logaretm/vee-validate v4.4.0-alpha.0

latest releases: v4.12.8, v4.12.7, v4.12.6...
pre-release3 years ago

⚠️ 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 or setFieldError for non-existing fields and it will affect the form's validity.
  • You can set custom values with setValues or setFieldValue 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 use handleChange(event, shouldValidate = false) as an alternative.
  • valueProp was renamed to checkedValue to better reflect its usage, you may still use the old prop name but it will be removed in the next minor release.

Don't miss a new vee-validate release

NewReleases is sending notifications on new releases.