* Check the Customer Name for blank submission*/
HOW TO ADD PAGE IN WORD DEVELOPER VALIDATION CODE
Write down the validation code and close the script. Open a script tag, add a function called “ form_validation” which you’ve mentioned in the onsubmit property of the. You can validate from both frontend and backend, I’m giving an example of frontend data validation using JavaScript. Never trust user data, always validate the data collected from user submission, before inserting into database. The final code will look like :Īfter designing the form it’s time to validate the form. Now, add some fields in the form like name, email, sex, age etc and close the form.