Java script validating form
But if the user unchecks the box, the user DOESNT have to enter info in textarea.
To check, whether the user entered correct form of data, it’s must to apply form validation in any of the form. The expression is: /^[a-z A-Z] $/ The above expression checks whether the input characters in the string is alphabet or not.
It is important to validate the form submitted by the user because it can have inappropriate values. The Java Script provides you the facility the validate the form on the client side so processing will be fast than server-side validation.For an alternative approach to client-side form validation, without Java Script, check out our new article on HTML5 Form Validation which is available now in most modern browsers.