You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Renat Zubairov (JIRA)" <de...@tapestry.apache.org> on 2008/02/06 22:27:09 UTC
[jira] Created: (TAPESTRY-2127) Limitations of the regexp validator
prevents email validation
Limitations of the regexp validator prevents email validation
-------------------------------------------------------------
Key: TAPESTRY-2127
URL: https://issues.apache.org/jira/browse/TAPESTRY-2127
Project: Tapestry
Issue Type: Bug
Components: Framework
Affects Versions: 5.0.9
Reporter: Renat Zubairov
I'm using regexp validation constraint to enable email validation, however since regular expresion may contain "," regexp parsing failing with exception
My regexp annotation:
@Validate("required,regexp=([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,6}")
public String getEmail() {
return email;
}
Exception is:
Caused by: java.util.regex.PatternSyntaxException: Unclosed counted closure near index 62
([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2
^
at java.util.regex.Pattern.error(Pattern.java:1650)
at java.util.regex.Pattern.closure(Pattern.java:2690)
at java.util.regex.Pattern.sequence(Pattern.java:1798)
at java.util.regex.Pattern.expr(Pattern.java:1687)
at java.util.regex.Pattern.compile(Pattern.java:1397)
at java.util.regex.Pattern.<init>(Pattern.java:1124)
at java.util.regex.Pattern.compile(Pattern.java:817)
at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:639)
at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:637)
at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:53)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2127) Limitations of the regexp validator
prevents email validation
Posted by "Renat Zubairov (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Renat Zubairov updated TAPESTRY-2127:
-------------------------------------
Attachment: Picture 1.png
Also when we are using email validation with regular expression error message looks *very* wired.
> Limitations of the regexp validator prevents email validation
> -------------------------------------------------------------
>
> Key: TAPESTRY-2127
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2127
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 5.0.9
> Reporter: Renat Zubairov
> Attachments: Picture 1.png
>
>
> I'm using regexp validation constraint to enable email validation, however since regular expresion may contain "," regexp parsing failing with exception
> My regexp annotation:
> @Validate("required,regexp=([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,6}")
> public String getEmail() {
> return email;
> }
> Exception is:
> Caused by: java.util.regex.PatternSyntaxException: Unclosed counted closure near index 62
> ([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2
> ^
> at java.util.regex.Pattern.error(Pattern.java:1650)
> at java.util.regex.Pattern.closure(Pattern.java:2690)
> at java.util.regex.Pattern.sequence(Pattern.java:1798)
> at java.util.regex.Pattern.expr(Pattern.java:1687)
> at java.util.regex.Pattern.compile(Pattern.java:1397)
> at java.util.regex.Pattern.<init>(Pattern.java:1124)
> at java.util.regex.Pattern.compile(Pattern.java:817)
> at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:639)
> at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:637)
> at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:53)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-2127) Limitations of the regexp
validator prevents email validation
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566365#action_12566365 ]
Howard M. Lewis Ship commented on TAPESTRY-2127:
------------------------------------------------
Regular expressions are not meant to go inline, they are too complicated.
See nightly docs for a correct approach: http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/TextField.html
> Limitations of the regexp validator prevents email validation
> -------------------------------------------------------------
>
> Key: TAPESTRY-2127
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2127
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 5.0.9
> Reporter: Renat Zubairov
> Attachments: Picture 1.png
>
>
> I'm using regexp validation constraint to enable email validation, however since regular expresion may contain "," regexp parsing failing with exception
> My regexp annotation:
> @Validate("required,regexp=([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,6}")
> public String getEmail() {
> return email;
> }
> Exception is:
> Caused by: java.util.regex.PatternSyntaxException: Unclosed counted closure near index 62
> ([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2
> ^
> at java.util.regex.Pattern.error(Pattern.java:1650)
> at java.util.regex.Pattern.closure(Pattern.java:2690)
> at java.util.regex.Pattern.sequence(Pattern.java:1798)
> at java.util.regex.Pattern.expr(Pattern.java:1687)
> at java.util.regex.Pattern.compile(Pattern.java:1397)
> at java.util.regex.Pattern.<init>(Pattern.java:1124)
> at java.util.regex.Pattern.compile(Pattern.java:817)
> at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:639)
> at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:637)
> at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:53)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-2127) Limitations of the regexp
validator prevents email validation
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566368#action_12566368 ]
Howard M. Lewis Ship commented on TAPESTRY-2127:
------------------------------------------------
Another alternative would be to define an email Validator to the FieldValidatorSource service configuration.
> Limitations of the regexp validator prevents email validation
> -------------------------------------------------------------
>
> Key: TAPESTRY-2127
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2127
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 5.0.9
> Reporter: Renat Zubairov
> Assignee: Howard M. Lewis Ship
> Attachments: Picture 1.png
>
>
> I'm using regexp validation constraint to enable email validation, however since regular expresion may contain "," regexp parsing failing with exception
> My regexp annotation:
> @Validate("required,regexp=([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,6}")
> public String getEmail() {
> return email;
> }
> Exception is:
> Caused by: java.util.regex.PatternSyntaxException: Unclosed counted closure near index 62
> ([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2
> ^
> at java.util.regex.Pattern.error(Pattern.java:1650)
> at java.util.regex.Pattern.closure(Pattern.java:2690)
> at java.util.regex.Pattern.sequence(Pattern.java:1798)
> at java.util.regex.Pattern.expr(Pattern.java:1687)
> at java.util.regex.Pattern.compile(Pattern.java:1397)
> at java.util.regex.Pattern.<init>(Pattern.java:1124)
> at java.util.regex.Pattern.compile(Pattern.java:817)
> at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:639)
> at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:637)
> at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:53)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-2127) Limitations of the regexp validator
prevents email validation
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-2127.
------------------------------------------
Resolution: Invalid
Assignee: Howard M. Lewis Ship
See comments and documentation.
> Limitations of the regexp validator prevents email validation
> -------------------------------------------------------------
>
> Key: TAPESTRY-2127
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2127
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 5.0.9
> Reporter: Renat Zubairov
> Assignee: Howard M. Lewis Ship
> Attachments: Picture 1.png
>
>
> I'm using regexp validation constraint to enable email validation, however since regular expresion may contain "," regexp parsing failing with exception
> My regexp annotation:
> @Validate("required,regexp=([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,6}")
> public String getEmail() {
> return email;
> }
> Exception is:
> Caused by: java.util.regex.PatternSyntaxException: Unclosed counted closure near index 62
> ([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2
> ^
> at java.util.regex.Pattern.error(Pattern.java:1650)
> at java.util.regex.Pattern.closure(Pattern.java:2690)
> at java.util.regex.Pattern.sequence(Pattern.java:1798)
> at java.util.regex.Pattern.expr(Pattern.java:1687)
> at java.util.regex.Pattern.compile(Pattern.java:1397)
> at java.util.regex.Pattern.<init>(Pattern.java:1124)
> at java.util.regex.Pattern.compile(Pattern.java:817)
> at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:639)
> at org.apache.tapestry.services.TapestryModule$9.coerce(TapestryModule.java:637)
> at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:53)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org