Really Simple Validation (RSV) Demos - Prototype Extension
Demos
2. A second example
3. All validation rules
4. Display type: alert-one
5. Display type: display-html
6. Custom validation rule
7. Custom error handler

<< Main page

#1: A simple example

This is an "out the box" validation, using all the default settings. As with all these demos, see the bottom of the page for all pertinent configuration and validation code.

First Name:
Last Name:
Email:
Your age:
Marital Status:


Event.observe(window, "load", function() {
        new RSV({
          errorFieldClass: "errorField",
          formID: "demo_form1",
          onCompleteHandler: myOnComplete,
          rules: [
            "required,first_name,Please enter your first name.",
            "required,last_name,Please enter your last name.",
            "required,email,Please enter your email address.",
            "valid_email,email,Please enter a valid email address.",
            "required,any_integer,This field may only contain digits.",
            "digits_only,any_integer,This field may only contain digits."
          ]
        });
});