Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Remote validation on Keyups

$
0
0

I've noticed that the remote validation (which is pretty cool and easy to implement BTW) works by sending a network request for every keypress in a field. I can't be the only one who thinks this is pretty inefficient and a huge drain on server resources continually checking incomplete data. Would it be sensible to offer the option to only validate on losing focus - ie when the user has typed in all the data.

eg. If you're remotely validating a credit card number, its pointless validating it until you ave the whole number. An email address doesn't need to be validated until at least after the @ symbol has been entered, usernames make no sense until the whole name has been entered (especially if you don't want 'bigcoder123' to know that 'bigcoder12' exists as a username). Currently typing a credit card number in would trigger 16 validation attempts, 15 of which will always fail.

So an option of when to validate (for remote validation, I don't think it matters so much for client validation) would be a good thing to have.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>