Parsley.js v2.1.0 Release Notes
-
Event remodel
- New API
on
andoff
to register for events - Global listeners added with
Parsley.on
- Using the new API, event names no longer have their ".parsley" ending
- Compatibility with previous API is maintained, but
$.emit
,$.listen
, etc. are now deprecated (#899)
- New API
๐ New features
- New event 'form:submit' fired before a form is submitted.
- The
value
option can now be a function - Parsley.version is now the best way to get the current version
- Additional translations
๐ Changes
- Error containers are created only the first time they are needed.
- [BC Break]
isValid()
field method now returns just a boolean,[]
is no more returned when field is optional and empty.needsValidation()
appears now to indicate if a valid field needed a validation.
๐ Bug fixes
- Speed optimization (#855)
- Eemote cache now cleared after form submission (#813)
- Event 'field:reset' now fired if a field is no longer validated (because it is excluded, or removed) (#841)
- Support for validators with compound names by restoring full case sensitivity to error messages. (#805)
- Fix conflict between different forms on the same page (#888)
- Handles checkbox names containing spaces (#881)
- Detects name conflicts between validators and regular options
- Compatible with jQuery.noConflict() (#859)