Releases: maestrooo/ember-cli-html5-validation
Releases · maestrooo/ember-cli-html5-validation
v0.2.4
- Fixed a bug where the
ValidatableInput
mixin reseted thesetCustomValidity
to valid, which prevented the form to be considered as invalid if one input was manually set to invalid. The end-user is now responsible to reset the input to a valid state by callingsetCustomValidity('')
whenever the value is valid.
v0.2.3
v0.2.2
v0.2.1
v0.2.0
- When using
validatable-form
component, you now need to set the target of submit button to the form component and explicitly set an action.
Before:
{{#validatable-form onSubmit=(action 'saveUser') as |form|}}
<input type="submit" value="Submit form">
{{/validatable-form}}
After:
{{#validatable-form onSubmit=(action 'saveUser') as |form|}}
<input {{action 'submit' target=form}} value="Submit form">
{{/validatable-form}}
This actually brings one major advantage: you can now have multiple actions within your form. For instance, if you have on "save" and "saveAndActivate" buttons, you can do so:
{{#validatable-form onPrimary=(action 'saveAndActivateUser') onSecondary=(action 'saveUser') as |form|}}
<input {{action 'submit' 'onSecondary' target=form}} value="Save">
<input {{action 'submit' 'onPrimary' target=form}} value="Save and activate">
{{/validatable-form}}