php_guy Posted October 26, 2010 Share Posted October 26, 2010 I'm in the habit of verifying input client side. For example, there is a field to enter a number, and I ensure that it is within a particular range using Javascript. My backend PHP code does not do such checking... Is this bad? Should I be doing checking using my backend code and send a response back to the client to display a message? Admittedly, I avoid it, since it's a little extra work -- well more extra than just javascripts, IF-THEN-ALERT type statement. Link to comment https://forums.phpfreaks.com/topic/216842-client-side-verification-any-use/ Share on other sites More sharing options...
BlueSkyIS Posted October 26, 2010 Share Posted October 26, 2010 my opinion: always check server-side. if you have the time and/or desire, add client-side. Link to comment https://forums.phpfreaks.com/topic/216842-client-side-verification-any-use/#findComment-1126483 Share on other sites More sharing options...
Pikachu2000 Posted October 26, 2010 Share Posted October 26, 2010 Done properly, client-side checks can make it more convenient for the user to fill out a form. Done improperly, they can be irritating enough to cause the user to simply leave and not return. Client-side checks really can't be considered validation at all, though. It needs to be done server-side. Link to comment https://forums.phpfreaks.com/topic/216842-client-side-verification-any-use/#findComment-1126486 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.