|
|
|
|
|
by nilliams
5122 days ago
|
|
Does HTML5 validation really matter when your goal is to build an MVC JavaScript app? I'm not trolling btw, many others in the community have long had validation pegged as a red herring [1] [2]. Validation of your attributes is fairly meaningless, and if you have a decent validator setup as part of your workflow (save-time or build-time - I personally wouldn't bother with either), then you should be able to customise it to turn off silly errors. You could also pre-process your JS files as part of your build step to replace ng-* with data-ng-* if it really meant that much to you. The byte-saving doesn't matter of course, but it seems like extra typing and more repetition in your templates for zero benefit. [1] https://groups.google.com/forum/?fromgroups#!msg/html5boiler... [2] http://www.nczonline.net/blog/2010/08/17/the-value-of-html-v... |
|
Why should you avoid it? Because, basically, if it's explicitly forbidden, or not covered by spec, you can't be sure of what will happen in all (or newer) browser implementations. If there's no defined behavior for some code, any behavior is correct.
Also, it's not like you have to go an extra mile in order to follow the specs here.