Sunday, 15 March 2015

php - How to validate form data when browser's javascript is disabled? -



php - How to validate form data when browser's javascript is disabled? -

i set validation check inputed info valid or not. checking done javascript. however, when disabled browser's javascript validation not working.

server side validation best alternative always. if server side validation out of scope, leverage html5 form validation.

html5 offers validation of web addresses entered fields, , numbers in fields. validation of numbers takes business relationship min , max attributes, browsers not allow submit form if come in number large.

if don't want validate form using html5 simple utilize novalidate atribute

<form novalidate> <input type="email" id="addr"> <input type="submit" value="subscribe"> </form>

php javascript

No comments:

Post a Comment