3 ms·
I wish they wouldn't show error prompts when the user has just started entering characters
by eluos 13y ago
I wish they wouldn't show error prompts when the user has just started entering characters
- omarshammas 13y agoThe demo was just meant to show what you can do with the formatters and the validators. Those error prompts are not part of the library. In the demo, I setup some event listeners that get triggered on 'keyup change blur'. In the callback function, the value of the input field is validated and a message is shown to the user. Maybe for your needs, it can be triggered on 'blur'. Or you even create your own setup. Formance.js simply provides the formatters and validators, and you can plug and play however you see fit.
- RaphiePS 13y agoI agree, way too many sites do this. I've done usability tests and users get scared that they're doing something wrong. I just listen for a blur event and then display errors until it's actually valid.