🐛 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
andafter
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 byv-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 theiruntouched
andtouched
flags onclick
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 betweenvalidateAll
andvalidateScopes
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.