Validating forms with jquery
Second, it requires that the back-end code be customized to meet the needs of each form.
Webvanta uses primarily client-side validation for public forms.
the form: rejecting the submission and giving the user feedback about what's wrong, if the provided information is incomplete or invalid.
There's two fundamentally different ways to do form validation: Server-side validation is the most robust, in that it can't be bypassed by disabling Java Script or otherwise modifying the front-end code, and it is important when you are submitting information directly into a business-critical database with strict requirements. First, it is only performed after the form is submitted, and must wait for a response from the server, so the user experience is not great.
Fortunately, as with most web site features that cry out for Java Script, there's an excellent j Query Validation plugin available.
To use this plugin to validate your forms, you need to do three things: In this example, we've loaded the code from the shared "/webvanta" library — these files are not directly visible within your site's admin interface, but they are available to all Webvanta sites (see Accessing Open-Source Library Files for details).