JavaScript Examples
JavaScript Menu
Home
Validation Example
This examples shows validation of different input fields. When the button is clicked, method validateAll() is invoked. This method than calls appropriate validation methods passing them string parameters. If any of the validation methods returns false, an error message is generated. If everything is fine, the user is transferred to another page.
Number:
-- method validateNumber()
Email:
-- method validateEmail()
Telephone:
-- method validatePhone()
Empty or not:
-- method validateEmpty()