Skip to content

Releases: colinaut/alpinejs-plugin-simple-validate

Release 1.8.2

01 Apr 19:32
Compare
Choose a tag to compare

Plugin now only adds error messages to fields that need it. It skips "type=hidden" inputs and any fields that are not required or have a pattern. Fields with Alpine binding ":required" ":pattern" or "x-validate" are assumed to require error handling.

Commits

  • feat: don't add error messages to fields that don't need it (b97eaac)
  • fix: remove logs (795e127)

Release 1.8.1

01 Apr 18:50
Compare
Choose a tag to compare

Removed adding error msg for type=hidden inputs

Release 1.8.0

13 Mar 21:54
Compare
Choose a tag to compare
  • Works with nested fieldsets for $validate magic functions like isComplete(), data(), or value().
  • Disabled is now a field property of the formData object. When a field is disabled, either by setting disabled on the field itself or a parent fieldset, the disabled property is set to true. Disabled fields are valid by default and return no value. Disabled is watched for by a mutation observer so AlpineJS binding of :disabled will work.
  • Hidden attributes no longer require x-validate in order to update when set with :value or other javascript that dynamically updates the value. The mutation observer automatically spots the change and updates.
  • BREAKING CHANGE x-required is removed. Use AlpineJS binding :required instead to set required dynamically.

Fix for checkbox groups error msg

07 Mar 20:27
Compare
Choose a tag to compare

Fix for issue with checkbox group error message introduced in recent other fixes.

Release 1.7.27 — FIX for id based error messages

27 Feb 19:48
Compare
Choose a tag to compare

1.7.25 broke the use of making custom error messages using ids. This release fixes that.

Breaking Change: If you use the id approach for custom error messages it now uses the id of the field and not the name. So the id is as follows: error-msg-${id-of-matching-field}. This change is required for multiple forms where they may have the same named fields, whereas id tags will always be unique.

Note that when these error messages are autogenerated, the code also uses the id of the field. If the field does not have an id it creates a unique one randomly which is used to match to the error message.

Release 1.7.25 Fix for multiform

27 Feb 04:00
Compare
Choose a tag to compare

Commit:

  • fix(multiform): add id for forms missing ids and used for unique id for error messages (fa221ee)

This fixes issues with error messages ids where two forms have the same named field. Error messages now have unique ids based on the form ID and id or name of the field. If the form does not have an ID it is assigned a randomized one when the script initializes.

Release 1.7.24 Fix for multi-forms and error messages

22 Feb 19:18
Compare
Choose a tag to compare
  • docs: examples updates (b1139c9)
  • fix: multiple forms with fields same name error messages (882b751)

Release 1.7.23

07 Oct 02:36
Compare
Choose a tag to compare
  • fix: for submit issue with hitting return (45bcb5d)

Release 1.7.22

07 Oct 00:58
Compare
Choose a tag to compare
  • feat: added validate-on-submit option (f77cafa)

Release 1.7.21

27 Jul 19:31
Compare
Choose a tag to compare
  • chore: upgrade release-it (6d792e8)
  • fix: allow [] in name fields (3f701d2)
  • refactor: did not need Alpine.nextick (8c5017d)