2 ms·
Agreed. Though, as a developer, I like to extend the submission actions a little bit to make error messages fit in with the rest of the site and maybe suggest w
by jeroenhd 7y ago
Agreed. Though, as a developer, I like to extend the submission actions a little bit to make error messages fit in with the rest of the site and maybe suggest what to do in order to correct the input (e.g. remove letters from phone numbers, pick a better password, etc.)
I do consider using the HTML5 form validation to be the proper validation API. Browser can do a lot without javascript and relying on their default behaviour is still making use of the validation API.
- unilynx 7y agoYou can do a lot with setCustomValidity to improve error messages while still using the rest of the HTML5 validation API.
- jeroenhd 7y agoYou're totally right, but the Firefox popover indicating what's going wrong doesn't go with some of the designs I make. On a bootstrap-based design I much prefer bootstrap-style error messages which are easy to do with Javascript, and the same is true for Material-based designs. I do think that people generally overlook the built-in form validation though, and I like to use them as a fallback for Javascriptless environments to ensure everyone can get proper validation.