npm vee-validate 2.1.0-beta.8

latest releases: 4.12.8, 4.12.7, 4.12.6...
5 years ago

Issues Fixed:

  • Fix vmId not being respected when removing errors for similar fields across multiple component scopes. #1522
  • Fix vmId not being included when clearing the error bag when calling the reset method on the validator. #1514
  • Fix model event detection for custom components when a model prop is configured but not an event. #1517

New features

  • Verify API: This new validator instance method allows you to check a value against a set of rules. #1475
import { Validator } from 'vee-validate';

const v = new Validator();
const { valid, errors } = await v.verify('test', 'max:3');

// the valid prop indicates the result of validation.
console.log(valid); // false

// The `errors` is an array of error strings.
console.log(errors); // ["The {field} field may not be greater than 3 characters."]

Note that target rules won't work like confirmed due to them require having a target field to track.

Don't miss a new vee-validate release

NewReleases is sending notifications on new releases.