You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Sean Scott (JIRA)" <ta...@jakarta.apache.org> on 2006/02/04 22:14:03 UTC
[jira] Created: (TAPESTRY-858) validators:pattern=
does not support useful regex patterns
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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: [jira] Created: (TAPESTRY-858) validators:pattern= does not support useful regex patterns
Posted by Howard Lewis Ship <hl...@gmail.com>.
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) <ta...@jakarta.apache.org> 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: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
--
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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
[jira] Resolved: (TAPESTRY-858) validators:pattern=
does not support useful regex patterns
Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
[ 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-858) validators:pattern=
does not support useful regex patterns
Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/TAPESTRY-858?page=all ]
Howard M. Lewis Ship updated TAPESTRY-858:
------------------------------------------
type: Wish (was: Bug)
Priority: Minor (was: Major)
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.
> validators:pattern=<somepattern> does not support useful regex patterns
> -------------------------------------------------------------------------
>
> Key: TAPESTRY-858
> URL: http://issues.apache.org/jira/browse/TAPESTRY-858
> Project: Tapestry
> Type: Wish
> Components: Framework
> 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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org