Validator, for Bootstrap 3 v0.11.0 Release Notes

Release Date: 2016-12-05 // over 7 years ago
  • BREAKING CHANGES:
    • Custom validators are now expected to return an error string if the field is invalid.
    • ๐Ÿšš The errors option has been removed. Override $.fn.validator.Constructor.DEFAULTS.errors if you want to change the default match and minlength errors.
    • The validator no longer skips disabled/invisible fields. If you want this behavior back, add $.fn.validator.Constructor.INPUT_SELECTOR += ':enabled:visible' to your code. (#115) (#134) (#317)
    Enhancements:
    • โž• Added support for distinct custom errors for the standard HTML5 attribute validators. No more being stuck with data-native-error="" for all of them. (#222) (#241) (#285)
    • โž• Added a .validator('update') method to refresh the set of fields that will be validated (#306)
    • โž• Added support of data-validate="true|false" on inputs to force validation of that field
    • Immediately validating fields that already have a value upon validator initialization (#350)

    ๐Ÿ›  ###### Bugfixes:

    • ๐Ÿ›  Fixed a bug in Safari where element.checkValidity() was returning stale values (#293)
    • ๐Ÿ›  Fixed a bug where spaces at the end of inputs were being trimmed off before being run through validators (#338)
    • Custom validators no longer leak to other instances of Validator. (#176)
    • ๐Ÿ’ป Scrolling with focus: true option is now triggered on $('html, body') instead of $(document.body) for better cross-browser support (#282)
    • โœ‚ Removed (value == previousValue => skip) optimization. It was breaking the match validator and wasn't improving perf that much. (#316) (#340)
    • โž• Added $.fn.validator.Constructor.VERSION property for parity with core Bootstrap plugins

    ๐Ÿ“„ ###### Docs Changes:

    • ๐Ÿ“„ Docs: Added an Overview section which calls out that whatever conventions apply to Bootstrap's core plugins also apply here
    • ๐Ÿ“„ Docs: Added a callout blurb about the standard attribute validators
    • ๐Ÿ“„ Docs: Added a "Validated fields" section to document the Validator.INPUT_SELECTOR field
    • ๐Ÿ“„ Docs: Removed $() from method headers, which was confusing some people (#202)