You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Robert Zeigler (JIRA)" <ji...@apache.org> on 2009/05/11 20:33:45 UTC

[jira] Assigned: (TAP5-692) T5 should pick up validators to be applied to a field from the containing component's .properties file.

     [ https://issues.apache.org/jira/browse/TAP5-692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Zeigler reassigned TAP5-692:
-----------------------------------

    Assignee: Robert Zeigler

> T5 should pick up validators to be applied to a field from the containing component's .properties file.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-692
>                 URL: https://issues.apache.org/jira/browse/TAP5-692
>             Project: Tapestry 5
>          Issue Type: New Feature
>          Components: tapestry-core
>            Reporter: Robert Zeigler
>            Assignee: Robert Zeigler
>            Priority: Minor
>
> Currently, there are two core-supported methods for specifying the validators to be applied to a particular form field: the @Validator annotation, and the validate attribute.  Tapestry supports, however, specifying constraints to a specific validator in the .properties file. For instance: 
>   <t:textfield t:id="someField" validate="regexp">
> Could have an entry in the .properties file such as:
>   someField-regexp=^\d+$
>   someField-regexp-message=You must input a number for someField
> What would be equally nice is to be able to specify the actually regexp validator as a constraint in the .properties file:
>   someField-validators=regexp
> Or
>   someField-validators=required,regexp
> This would be helpful for using, eg, BeanEditForm, where you might want to specify the constraints for a large number of fields, don't want to provide parameters for each of those fields, and you don't have access to the source to add @Validator to each of the properties.
> This will probably take the form of a new ValidationConstraintGenerator, but there may be some additional "plumbing" involved to get access to the containing page/component's message catalog.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.