HTML 5 form novalidate attribute

376 views
Skip to first unread message

Tony Nelson

unread,
Dec 28, 2011, 11:49:05 AM12/28/11
to ColdMVC
Would it make sense for ColdMVC to add the novalidate attribute to
forms by default when using <c:form>? I find the HTML 5 form
validation a little wonky and I think it might be best if developers
had to opt-in to using it.

I could also add the ability to configure it on/off by default using
your config.ini. For example, you'd be able to set
coldmvc.form.options.form.novalidate = true or something like that.

Thoughts?

Ryan Arneson

unread,
Dec 28, 2011, 11:57:06 AM12/28/11
to col...@googlegroups.com
If you didn't add the config option, how would you get rid of the novalidate attribute from the form tag if you wanted to use it?

Tony Nelson

unread,
Dec 28, 2011, 11:59:44 AM12/28/11
to ColdMVC
I would update the attribute to support boolean values, so that
<c:form novalidate="true" /> would add the novalidate attribute and
<c:form novalidate="false" /> would remove it if it existed.

FYI, negatively-named attributes and valueless attributes are
horrible.

On Dec 28, 10:57 am, Ryan Arneson <arne...@gmail.com> wrote:
> If you didn't add the config option, how would you get rid of the
> novalidate attribute from the form tag if you wanted to use it?
>

Ryan Ricard

unread,
Dec 28, 2011, 12:55:47 PM12/28/11
to col...@googlegroups.com
Until there is broader browser support for inline validation, it makes sense to default ColdMVC forms to novalidate with an opt-in option. 
Reply all
Reply to author
Forward
0 new messages