I loved how you explain things, Ryan! I didn't know about the Norman Nielsen Guidelines, I'll definitely use them in my projects.
As far as I understand, the API has two ways to run code when a field is invalid, is that correct? You can use a simple if(!field.validity.valid), but you also call field.checkValidity() and handle the invalid event.
I’m a front-end developer and designer based in Fort Worth, TX with a passion for web technologies, inclusivity, and Texas BBQ. I currently help make the space that comes from The Container Store.
I loved how you explain things, Ryan! I didn't know about the Norman Nielsen Guidelines, I'll definitely use them in my projects.
As far as I understand, the API has two ways to run code when a field is invalid, is that correct? You can use a simple
if(!field.validity.valid)
, but you also callfield.checkValidity()
and handle theinvalid
event.Correct. Thanks for the kind words!