Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using 'novalidate' to turn off browser built in form validation - good thing or bad ? 2

Status
Not open for further replies.

c0deM0nK424

Programmer
Oct 28, 2007
126
GB
Hi,

I'm curious in wanting to know if overriding html5 built in form validation is a good thing, so that browsers like IE10,11 and chrome are prevented from outputting those little tooltips/bubbles that inform the user if and when a field has not been entered etc.


If one is to do this, and simply rely on jquery validation and php validation, is this better ? is this the more widely practiced industry way of doing it ?


I also ask this because I've read some books on html 5 and responsive web design where the authors have spent entire chapters on the new features of html5 , especialy the buitl in form validation techniques which mean you dont necessarily need to use a lot of javascript/jquery to do it.


Im just a little unsure as to which way to go.


For speed, and getting a form made fast - is it best to leave it to html5's built in validation tools, and then simply use server side validation as the last way to check a form validates ?

or woudl you bypass/override html5 form validation in favour of something like jquery.validate , using this and php instead ?

 
Nothing is "better" than another per se. You have to decide which is 'right' for your documents and the site they are being used on. By far the 'best' way of validating user input data is on the server, client side validation can only really confirm that data is present and most likely is in the appropriate format.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
It's your call how you deal with data validation, but as Chris states, client side validation doesn't replace server side validation it accompanies it.

HTML5 form validation is great and I use it solely now that we have enforced HTML5 only browsers on our members, but that is only possible if you are lucky enough to be able to enforce HTML5 compatible browsers upon your end users.

I've tried the polyfill / webshim route and found it too unreliable to be worth bothering with, you might as well just use JQuery or what ever client side validation framework you were using before HTML5.

Like usual it's mainly MS that causes all the cross browser compatibility problems with their crappy IE9 and not allowing certain new versions of IE to run on certain old versions of their OS. Luckily there are plenty of other HTML5 browsers out there that will run fine on older MS OSes!

For speed, and getting a form made fast - is it best to leave it to html5's built in validation tools, and then simply use server side validation as the last way to check a form validates ?
Not saying it's best, but it is the easiest and fastest way to build a validating form. I like to use it with a little JQuery events handling so there is real-time visual validation to the user with custom fonts and CSS , check out the form on our join us page for a demo
or woudl you bypass/override html5 form validation in favour of something like jquery.validate , using this and php instead ?
I wouldn't no, I've dumped all the JQuery.validate code I used to use, it was never that developer friendly, though it was powerful. I much prefer my new HTML5 way of doing it. Though I don't use PHP server side (unless I'm hacking the WordPress install), as I'm a Perl head [wink]





"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top