Adding Server-side Capabilities to Form Validation with the DOM
Are you looking for a comprehensive guide on how to create a form validation system that uses the DOM for displaying error messages, instead of showing silly alerts? Then this group of three articles (of which this one is the third) may fit your requirements. They're aimed at showing you how to perform client-side validation on your own online forms.
Adding Server-side Capabilities to Form Validation with the DOM (Page 1 of 5 )
Despite the fact that checking the validity of data entered in web forms has been covered many times, the introduction of modern techniques of web development, destined to dynamically manipulate the tree of a given web document, opens a brand new range of possibilities for displaying error messages and notices.
Iíve been using this type of script during the development of distinct web applications that only required basic client-side validation on online forms. I've achieved decent results, so naturally I thought the experience itself deserved an in-depth look. Keeping this in mind, in the two previous articles of the series I explained how to create a simple form validation mechanism which utilizes the DOM to display the corresponding error messages.
However, due to the fact that any robust form checking application must be founded on the capabilities offered by server-side validation, in this final part of the series Iíll show you how to integrate the existing client-side script with a handy form verification class, developed with PHP 5. Hopefully, the correct integration of both client and server modules should result in the implementation of a robust mechanism, handy for verifying the validity of all the data entered into web forms.
Having defined the subject of this concluding tutorial, letís move on and learn together how to add server-side validation capabilities to the original client script. Letís go!