You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jun Tsai (JIRA)" <ta...@jakarta.apache.org> on 2006/08/06 11:47:14 UTC

[jira] Commented: (TAPESTRY-1045) Pattern vlidator message is wrong.

    [ http://issues.apache.org/jira/browse/TAPESTRY-1045?page=comments#action_12426049 ] 
            
Jun Tsai commented on TAPESTRY-1045:
------------------------------------

I think  the buildMessage method should be
private String buildMessage(ValidationMessages messages, IFormComponent field)
    {
        return messages.formatValidationMessage(
                getMessage(),
                ValidationStrings.REGEX_MISMATCH,
                new Object[]
                { field.getDisplayName() , _pattern});
    } 



> Pattern vlidator message is wrong.
> ----------------------------------
>
>                 Key: TAPESTRY-1045
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-1045
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 4.1.1
>         Environment: tapestry 4.1.1
>            Reporter: Jun Tsai
>
> in tapestry.form.validator.Pattern
> private String buildMessage(ValidationMessages messages, IFormComponent field)
>     {
>         return messages.formatValidationMessage(
>                 getMessage(),
>                 ValidationStrings.REGEX_MISMATCH,
>                 new Object[]
>                 { _pattern, field.getDisplayName() });
>     }
> In ValidationStrings.properties
> regex-mismatch={0} is invalid.
> so the message is ${_pattern} is valid.I think the message should be ${field.getDisplayName()} is invalid.

-- 
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