This is specifically why I introduced the $bean syntax, since it gives you a much cleaner way to specify these complex expressions.
In fact, I usually define a <bean>, and use message: binding prefixes to allow me to store the actually regexp in a properties file. On 2/4/06, Sean Scott (JIRA) <[email protected]> wrote: > validators:pattern=<somepattern> does not support useful regex patterns > ------------------------------------------------------------------------- > > Key: TAPESTRY-858 > URL: http://issues.apache.org/jira/browse/TAPESTRY-858 > Project: Tapestry > Type: Bug > Components: Framework > Versions: 4.0 > Environment: All > Reporter: Sean Scott > > > 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] > > -- Howard M. Lewis Ship Independent J2EE / Open-Source Java Consultant Creator, Jakarta Tapestry Creator, Jakarta HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
