2008-12-29

Take times on data validation

In term of the data validation on the team member registration form, if missing the critical information (Screenshot 1 ) that manager concerned when member submit the data, an error message will prompt up to the user. En error message showed as screenshot 2. A remind mark also showed at next the item while the information is wrong or missing. Such as screenshot 3&4. I need to catch the time on other page development.

Screenshot 1
Screenshot 2
Screenshot 3


Screenshot 4

During the information validation, used the RegExp method verity the format of the information better than with a long procedure on data content validation. For example, with the RegExp syntax “/^0\d{9}$/” on 10 digits phone number validation ( first digit always is 0, others 9 digits are consisted with 0~9) fast than write a procedure with for loop on content validation. The RegExp syntax a bit complicated, hard to remember all the patterns; needs a reference help all the times.
Support Reference 1: Regular Expressions - User guide htttp://www.zytrax.com/tech/web/regex.htm
Support Reference 2: Use regular expressions to validate/format a string http://www.rgagnon.com/jsdetails/js-0063.html



No comments:

Post a Comment