Releases: colinaut/alpinejs-plugin-simple-validate
Releases · colinaut/alpinejs-plugin-simple-validate
v1.5.6
v1.5.5
v1.5.4
v1.5.3
v1.5.2
- Form id no longer required since formData references the form node itself. Magic formData functions still work with id but $refs is now recommended
- Fieldsets are detected when you use x-validate on form
<form>
$validate.isComplete()
can be used on either the form or individual fieldsets.
v1.5.1
Somehow a bug got in 1.5.0 sorry
v1.5.0
I've completely refactored this plugin. It's now simpler to use then before and has some new functionality:
- You only need to add
x-validate
to the<form>
element to get basic validation functionality and reactive formData! - It still works if you only want to add
x-validate
to the fields themselves! - It now also automatically includes group validation for groups of checkboxes and radio buttons!
- There are a few new UI modifiers.
It's still generally backwards compatible with a handful of small breaking changes:
x-validate.checked
isn't needed sincerequired
now works on checkboxes.- Date format modifiers are renamed (see Directives below).
- The modifier 'phone' is now 'tel' in keeping with the input type.
v1.4.1
Small Feature Addition:
- added
$validate.submit
function used on form element@submit="$validate.submit"
to validate before allowing submit
v1.4.0
New Features:
- Added reactive formData
$validate.isFormComplete('formId')
returns true or false depending on if every form field is validated or not$validate.formData('formId')
returns an array of form data {name,value,valid}
- Added
input
modifier to force validation on 'input' event from get go - Added additional examples