tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago H. de Paula Figueiredo (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-1815) Translators and/or Validators should override the <input> element's type attribute where appropriate to use HTML5 types
Date Tue, 01 Jul 2014 21:55:24 GMT

    [ https://issues.apache.org/jira/browse/TAP5-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14049360#comment-14049360
] 

Thiago H. de Paula Figueiredo commented on TAP5-1815:
-----------------------------------------------------

Implemented:
* A SymbolConstants.ENABLE_HTML5_SUPPORT (tapestry.enable-html5-support) configuration symbol
with "false" as default value.
* An Html5Support service with an isHtml5SupportEnabled() method, which is used in validators
and translators to know whether to assume HTML5 should be supported or not.
* "required" attribute with the Required validator
* "pattern" attribute with the Regexp validator
* "email" input type with the Email validator
* "min" attribute and "number" input type with the Min validator
* "max" attribute and "number" input type with the Max validator
* When bound to a number type,  TextField (through NumericTranslator) generates type="number"

So far, I haven't removed JavaScript client-side validation when HTML5 is used with the validators
above, just in case a browser without support for them is used.

Is there anything I'm missing?

> Translators and/or Validators should override the <input> element's type attribute
where appropriate to use HTML5 types
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1815
>                 URL: https://issues.apache.org/jira/browse/TAP5-1815
>             Project: Tapestry 5
>          Issue Type: New Feature
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Howard M. Lewis Ship
>            Assignee: Thiago H. de Paula Figueiredo
>
> Possibly this should be based on a configuration symbol as well.
> When validating that something is an email address, a validating regular expression is
nice, by type="email" is often nice.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message