npm vee-validate 2.0.0-rc.9

latest releases: 4.12.6, 4.12.5, 4.12.4...
6 years ago

🐛 Fixes

  • Fix an issue that prevented automatic classes from working. #680
  • Fix an issue where a falsy (like empty strings) rules would crash field initialization. #676
  • Fix an issue where disable modifier did not have an effect. #681
  • Fix before and after inclusion parameter that was ignored after recent changes to the pipeline. #683 thanks @rafi1978
  • Fix an issue when adding listeners for radio buttons and checkboxes groups because NodeList does not contain a forEach method. #686
  • Fix an issue that prevented disabled fields from being matched by the field query when validating a field #698
  • Fix failure to detect scopes for some scoped custom components. #699
  • Fix an issue with element-ui that caused an infinite loop. #696
  • Fix checkboxes not rejecting the false value when bound by v-model.

💯 Enhancements

  • Set the custom validity for native HTML fields, which allows you to target their css styling with psudo :valid and :invalid selectors. #671
  • The validator now validates the field after its rules change, this only happens if the field was validated previously either manually or by user input.
  • Updated type definitions #691 Thanks @agentschmitt
  • Checkboxes and Radio buttons do not emit a blur event on Mac, instead they will set their untouched and touched flags on click instead.
  • Validate method has been overloaded to support multiple usecases and to eliminate confusion with other methods, here is all the behavior supported by the validate method:
// No args, validates all fields regardless of scope.
validator.validate();

// '*' as the sole arg, validates all scopeless fields.
validator.validate('*');

// validate a specific scope
validator.validate('myScope.*');

// validates a specific field by id (used internally).
validator.validate('#fieldId');

// validates a specific field by name.
validator.validate('field');


// validates a scoped field (also a field with a dot in its name as a fallback):
validator.validate('scope.field');

This allows you to use the validate method as the primary way to validate fields and eliminates some confusion between validateAll and validateScopes since in time they will be less mentioned and used as examples, however they are not deprecated and will continually be exposed as a public API.

Don't miss a new vee-validate release

NewReleases is sending notifications on new releases.