Validation
June 19th, 2008
What is validation? Why is it important to use validation for your online forms?
Validation is the process of checking a forms values against a standard of expected values. It is a way to proofread or spell check what your user has entered as input. An example would be an expected 9 number combination and the user entered an email address. This would return as invalid content. Typically checked are empty fields, valid and well formed email addresses, dates, and the aforementioned a number entered in a text expected field (or vice-verse). If the tested field contains the expected input then the result is returned true and the form data is expected to be good data. It is important to use validation for online forms to add an extra bit of reliability and save time by ensuring a certain level of quality.
http://validator.w3.org/about.html
http://www.w3schools.com/js/js_form_validation.asp
What are the advantages and disadvantages of using client-side form validation over server-side validation?
JavaScript can be used to validate input data in HTML forms before sending off the content to a server. Client-side validation is completed on the user’s machine and therefore does not need to be sent anywhere to be processed. This means it can be handled with JavaScript and any erroneous or suspect input will be caught before an attempt to transmit the data. This will save time and add a bit of reliability to the collected information and its likeliness to successfully run on the server. Without this JavaScript client-side server checking, the information would be sent out and return, after a bit of a wait, with a not so welcoming message indicating there was a problem with the submitted content. Of course, there is a concern of possible spoofing of the information after the client-side form validation has completed.
Spoofing: A generic term covering a range of computer network attacks whereby the attacker attempts to forge or intercede in a chain of communication. This can take a number of forms: email spoofing, IP spoofing and webpage spoofing. http://www.parliament.vic.gov.au/SARC/E-Democracy/Final_Report/Glossary.htm
Entry Filed under: All, JavaScript
Leave a Comment
You must be logged in to post a comment.
Trackback this post | Subscribe to the comments via RSS Feed