Forum Moderators: open

Message Too Old, No Replies

Validation Code For Contact and Registration Forms

         

kaymeis

10:43 pm on Sep 13, 2014 (gmt 0)

10+ Year Member



Is it a good idea to have separate external validation scripts for registration and contact forms? Or should I do one external validation script for both?

rainborick

5:21 am on Sep 14, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The best answer is probably yes, you should have separate validation scripts for your registration and contact forms. While it's certainly possible to create a single script/function that would validate that all of the fields in a form contained some data in the appropriate format, without some level of customization for each form, it will have some shortcomings that will degrade the quality or reliability of the data. It's up to you as to how strict you make your validation code. It's also probably best to make your on-page validation just as strict as the validation incorporated into the script that processes the submitted data.

kaymeis

11:42 am on Sep 15, 2014 (gmt 0)

10+ Year Member



Thanx a mill rainborick.