You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org> on 2007/11/19 18:26:43 UTC
[jira] Created: (TRINIDAD-829) error message for validateRegExp
does not always show pattern information
error message for validateRegExp does not always show pattern information
-------------------------------------------------------------------------
Key: TRINIDAD-829
URL: https://issues.apache.org/jira/browse/TRINIDAD-829
Project: MyFaces Trinidad
Issue Type: Bug
Reporter: Matthias Weßendorf
Assignee: Matthias Weßendorf
Steps
=====
1. Create a new page with two input texts and nest Validate Reg Exp
on both input texts.
2. In one of the Validate Reg Exp provide patterns as [0-9]{3} and for the
second Validate Reg Exp provide [0-9]{5} as patterns
3. Run the page and end 1 in both the input text. The inputtext with Validate
Reg Exp having pattern [0-9]{3} show wrong error message 'The value you
entered does not match the regular expression pattern "[0-9]".'
while the input with Validate Reg Exp having pattern [0-9]{5} show correct
error message 'The value you entered does not match the regular expression
pattern "[0-9]{5}".'
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TRINIDAD-829) error message for validateRegExp
does not always show pattern information
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544475 ]
Matthias Weßendorf commented on TRINIDAD-829:
---------------------------------------------
workaround is to replace "{" by "{'" AND "}" by "'}"
and before returning the "parsed" error string, we re-replace it back.
> error message for validateRegExp does not always show pattern information
> -------------------------------------------------------------------------
>
> Key: TRINIDAD-829
> URL: https://issues.apache.org/jira/browse/TRINIDAD-829
> Project: MyFaces Trinidad
> Issue Type: Bug
> Reporter: Matthias Weßendorf
> Assignee: Matthias Weßendorf
>
> Steps
> =====
> 1. Create a new page with two input texts and nest Validate Reg Exp
> on both input texts.
> 2. In one of the Validate Reg Exp provide patterns as [0-9]{3} and for the
> second Validate Reg Exp provide [0-9]{5} as patterns
> 3. Run the page and end 1 in both the input text. The inputtext with Validate
> Reg Exp having pattern [0-9]{3} show wrong error message 'The value you
> entered does not match the regular expression pattern "[0-9]".'
> while the input with Validate Reg Exp having pattern [0-9]{5} show correct
> error message 'The value you entered does not match the regular expression
> pattern "[0-9]{5}".'
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (TRINIDAD-829) error message for validateRegExp
does not always show pattern information
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf resolved TRINIDAD-829.
-----------------------------------------
Resolution: Fixed
forgot to close the issue
> error message for validateRegExp does not always show pattern information
> -------------------------------------------------------------------------
>
> Key: TRINIDAD-829
> URL: https://issues.apache.org/jira/browse/TRINIDAD-829
> Project: MyFaces Trinidad
> Issue Type: Bug
> Reporter: Matthias Weßendorf
> Assignee: Matthias Weßendorf
> Fix For: 1.0.5-core
>
>
> Steps
> =====
> 1. Create a new page with two input texts and nest Validate Reg Exp
> on both input texts.
> 2. In one of the Validate Reg Exp provide patterns as [0-9]{3} and for the
> second Validate Reg Exp provide [0-9]{5} as patterns
> 3. Run the page and end 1 in both the input text. The inputtext with Validate
> Reg Exp having pattern [0-9]{3} show wrong error message 'The value you
> entered does not match the regular expression pattern "[0-9]".'
> while the input with Validate Reg Exp having pattern [0-9]{5} show correct
> error message 'The value you entered does not match the regular expression
> pattern "[0-9]{5}".'
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TRINIDAD-829) error message for validateRegExp
does not always show pattern information
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544473 ]
Matthias Weßendorf commented on TRINIDAD-829:
---------------------------------------------
the error happens, because of the "tokens" inside the formatErrorString also contain tokens.
Here is a simple demo:
var errorValue = "The value you entered does not match the regular expression pattern \"{2}\"."
var tokens = [null ,"1", "[0-9]{3}", null];
for the pattern the "error String parser" is called like:
var string = _formatErrorString(errorValue, tokens );
Basically the method replaces all {numberGoesHere} from the original String (errorValue).
in the third round of the look (tokens[2]), the {2} is replaced by "[0-9]{3}".
Now the errorString is:
The value you entered does not match the regular expression pattern [0-9]{3}
But... since the method is called with more params, in the next loop (tokens[3]), the {3} (which was originally a param) is replaced.
> error message for validateRegExp does not always show pattern information
> -------------------------------------------------------------------------
>
> Key: TRINIDAD-829
> URL: https://issues.apache.org/jira/browse/TRINIDAD-829
> Project: MyFaces Trinidad
> Issue Type: Bug
> Reporter: Matthias Weßendorf
> Assignee: Matthias Weßendorf
>
> Steps
> =====
> 1. Create a new page with two input texts and nest Validate Reg Exp
> on both input texts.
> 2. In one of the Validate Reg Exp provide patterns as [0-9]{3} and for the
> second Validate Reg Exp provide [0-9]{5} as patterns
> 3. Run the page and end 1 in both the input text. The inputtext with Validate
> Reg Exp having pattern [0-9]{3} show wrong error message 'The value you
> entered does not match the regular expression pattern "[0-9]".'
> while the input with Validate Reg Exp having pattern [0-9]{5} show correct
> error message 'The value you entered does not match the regular expression
> pattern "[0-9]{5}".'
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TRINIDAD-829) error message for validateRegExp
does not always show pattern information
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543619 ]
Matthias Weßendorf commented on TRINIDAD-829:
---------------------------------------------
issue is _formatErrorString() func
> error message for validateRegExp does not always show pattern information
> -------------------------------------------------------------------------
>
> Key: TRINIDAD-829
> URL: https://issues.apache.org/jira/browse/TRINIDAD-829
> Project: MyFaces Trinidad
> Issue Type: Bug
> Reporter: Matthias Weßendorf
> Assignee: Matthias Weßendorf
>
> Steps
> =====
> 1. Create a new page with two input texts and nest Validate Reg Exp
> on both input texts.
> 2. In one of the Validate Reg Exp provide patterns as [0-9]{3} and for the
> second Validate Reg Exp provide [0-9]{5} as patterns
> 3. Run the page and end 1 in both the input text. The inputtext with Validate
> Reg Exp having pattern [0-9]{3} show wrong error message 'The value you
> entered does not match the regular expression pattern "[0-9]".'
> while the input with Validate Reg Exp having pattern [0-9]{5} show correct
> error message 'The value you entered does not match the regular expression
> pattern "[0-9]{5}".'
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.