[ 
https://issues.apache.org/struts/browse/STR-2611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41323
 ] 

Paul Benedict commented on STR-2611:
------------------------------------

A private copy of getValueAsString is added to FieldChecks. This allows Commons 
Validator to maintain its lifelong signature and behavior for the method, but 
Struts can also detect an invalid form property.

> Cite the form name in validation exception message
> --------------------------------------------------
>
>                 Key: STR-2611
>                 URL: https://issues.apache.org/struts/browse/STR-2611
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: Nightly Build
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Ralf Hauser
>            Assignee: Paul Benedict
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> java.lang.NoSuchMethodException: Unknown property 'from'
>         at
> org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1122)
>         at
> org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:686)
>         at
> org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)
>         at
> org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
>         at
> org.apache.commons.validator.util.ValidatorUtils.getValueAsString(ValidatorUtils.java:105)
>         at
> org.apache.struts.validator.FieldChecks.validateMinLength(FieldChecks.java:859)
>         at sun.reflect.GeneratedMethodAccessor277.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:567)
>         at org.apache.commons.validator.Field.validateForRule(Field.java:827)
>         at org.apache.commons.validator.Field.validate(Field.java:906)
>         at org.apache.commons.validator.Form.validate(Form.java:174)
>         at org.apache.commons.validator.Validator.validate(Validator.java:367)
>         at
> org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:110)
> ...
> it appears that my form is validated against the rules of another form. 
> However,
> I cannot see an config error neither in my struts-config.xml nor in the
> validation.xml
> It would be helpful if in the case of an error also the form name from which 
> the
> field-rules are taken are cited!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to