extend()

extend Allows you to add more rules to be used globally by the vee-validate functions and components. For in-depth guide on how to add rules and their messages, see Guide: Basics - Adding Rules.

Signature

For the signature or the typings of the extend function, see extend() in source code.

Example

extend('positive', (value) => {
  if (value >= 0) {
    return true;
  }

  return 'This value must be a positive number';
});