Tying the Object to the Form
onblur to make sure that the field had been completed by the user before validating. Within this event, simply add
Validator.Validate(this, "email") in order to validate an email or other custom element. In the body
onload event, add the
Initialize method and enter the appropriate ids, image paths and number of required fields as the parameters. Lastly, we add an
onsubmit event to the form and make sure that all fields have been validated before allowing it to post. Listing 3 shows the new form incorporated with the Validator.