3 ms·
"or running the same form validation code on both the client- and the server side." That sounds great until you realize that you usually do a lot more validati
by CWIZO 15y ago
"or running the same form validation code on both the client- and the server side."
That sounds great until you realize that you usually do a lot more validation on the server than on the client (is the username taken, is password correct, etc etc). So you would still have to use PHP for validation (in most cases).
- ceejayoz 15y agoSure, but only for the cases not covered by the JS.
- CWIZO 15y agoI was trying to say that you don't really gain anything in this case. You would load some JS file (which would probably have to be written in a way that it could be used this way) just do do some simple validation (if (someField!='') for instance). Doesn't seem like worth the bother to me.