ferr
ferr

Reputation: 1217

Using new HTML5 validation/required input features a bad thing?

I've been getting into using some of the new HTML5 tags recently. One thing I realized is that, of course, a lot of these new tags only work on the most modern browsers. Wouldn't that be very bad if you decide to use input attributes such as required and pattern to validate input? Your entire system could be circumvented by someone just using an older version of a browser.

And if the answer is to have fallback validation techniques in case the user's browser is detected as being 'not modern' -- why bother using the HTML5 techniques, why not just use the fallback in the first place?

Should a page just say "this form is not compatible with your browser, please upgrade"? Or am I missing something?

Upvotes: 0

Views: 198

Answers (1)

Blindy
Blindy

Reputation: 67380

For one thing if your security is client side only (javascript, html5 stuff etc) then you have no security. Might as well not pretend you do. Client side checks are just for quick feedback to the user that something might be wrong, you always check on the server side again to make sure the input is right.

As to your other point, even if your page looks good with smooth html5 controls and css3, it doesn't mean that it can't still work with older rendering engines. A text box is a text box, and a button is a button. Only thing that's different is how fancy you get with it. The idea is to get as many customers as you can, not turn them away because they're browsing on something you don't like.

Upvotes: 1

Related Questions