[
http://issues.apache.org/struts/browse/SHALE-325?page=comments#action_38605 ]
Wendy Smoak commented on SHALE-325:
-----------------------------------
The error message key is specified in the rule itself, in custom-rules.xml.
<global>
<validator name="evenInteger"
classname="org.apache.shale.usecases.validator.CustomValidationUtil"
method="isEven"
methodParams="int"
msg="validate.test.not.even">
</validator>
</global>
There is no <message-bundle> tag in faces-config, and adding it didn't help.
The attribute for val:commonsValidator is 'message' (not msg). Adding that
fixes the NPE, but see above-- the message is specified in the rule, I
shouldn't have to say it again.
What do I need to do so that CommonsValidator.getErrorMessage can "see" the
resource bundle?
> Add a custom validation example to the Use Cases example app
> ------------------------------------------------------------
>
> Key: SHALE-325
> URL: http://issues.apache.org/struts/browse/SHALE-325
> Project: Shale
> Issue Type: Improvement
> Components: Validator
> Reporter: Wendy Smoak
> Priority: Minor
> Fix For: 1.0.4-SNAPSHOT
>
>
> Add an example of using a custom validator to the Commons Validator
> Integration section of the use-cases example app.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira