]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commit
feat(abide): add validator-specific error messages 11698/head
authorsoylent <soylent>
Sun, 24 Feb 2019 01:08:40 +0000 (18:08 -0700)
committersoylent <soylent>
Tue, 8 Oct 2019 03:54:29 +0000 (21:54 -0600)
commit5eac68172d86e27e8cbc0e76cf3ffc007b8e63f0
treedb40e5b4c6076ff3d43cb553b6c899847f88a497
parenta79f821c7c94b6d69ec3f3bf851a74af91444b84
feat(abide): add validator-specific error messages

Now you can add different error messages for each validator using the
`[data-form-error-on]` attribute.

<input required type="email">
<span class="form-error" data-form-error-on="required">Required</span>
<span class="form-error" data-form-error-on="pattern">Invalid</span>

BREAKING CHANGE: `Foundation.Abide#validateText()` no longer checks if
the input is required. Use the `Foundation.Abide#requiredCheck()` method
for that.

Closes #10799
docs/pages/abide.md
js/foundation.abide.js
test/visual/abide/error-messages.html [new file with mode: 0644]