Jump to content
I wonder how useful these new web input controls will actually be.
How will an error be visually displayed to a user when a particular regex is false or when a field doesn’t represent an email?
Equally how will a successful field entry be displayed to the user if required i.e. on blur of a field display a green tick? If we do this with custom JS, then we will have to be able to test the field to see if it’s valid. In which case how much value are these new attributes?
With errors usually you will want to add a class of “error” in order to do some sort of styling. Or you may want to add some HTML that displays a description of the error. This functionality is usually quite custom per project.
To acheive this sort of thing you may need something yucky like:
<input type=“email” onerror=“myFunc” onsuccess=“myOtherFunc” />
Hopefully I am lacking so much knowledge on this that all my concerns are silly.