[ http://issues.apache.org/jira/browse/TAPESTRY-858?page=all ]

Jesse Kuhnert resolved TAPESTRY-858.
------------------------------------

    Resolution: Won't Fix

> validators:pattern=<somepattern>   does not support useful regex patterns
> -------------------------------------------------------------------------
>
>                 Key: TAPESTRY-858
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-858
>             Project: Tapestry
>          Issue Type: Wish
>          Components: Framework
>    Affects Versions: 4.0
>         Environment: All
>            Reporter: Sean Scott
>            Priority: Minor
>
> ValidatorFactoryImpl.constructValidatorList   uses a regular expression to 
> parse the validators configuration string.  The configuration string can 
> contain the type pattern=<some regular expression>.  If the regular 
> expression contains a [ character (like most do) then the validators string 
> is not processed correctly.
> Currently:
>     private static final String PATTERN = 
> "^\\s*(\\$?\\w+)\\s*(=\\s*(((?!,|\\[).)*))?";
> Perhaps it can be changed so that the regex has start with ^ and end with $ 
> and thus maybe a PATTERN like
> ^\s*(\$?\w+)\s*(=(\^.*\$)|(\s*(((?!,|\[).)*)))?
> can be used.
> To test, try using this value
> validators="validators:required,pattern=(0[1-9]|1[012])/(0[1-9]|[12][0-9]|3[01])/(19|20)\d\d"
> (mm/dd/yyyy)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to