-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow custom constraint validation errors (#1023)
* feat(input): allow custom constraint validation errors This feature provides a new way to override the browser's default constraint validation messages, making `validationMessage` unnecessary. * feat(input): make overriding browsers' validation messages easier With this change, rather than having to duplicate the browser's native validation logic when selecting a custom message, the parent component can just react to the validity state that the browser reports. * fix(inputs): fix constraint validation for nested controls For controls nested inside each other, the parent usually component handles constraint validation concerns, so there's no need for the children to also handle validation; in fact, they can cause incorrect changes to the field state if their validation isn't suppressed. The one exception is that the child control which actually owns the "main" input element must forward the `invalid` event to the parent control. * docs: update docs
- Loading branch information
Showing
27 changed files
with
536 additions
and
351 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.