You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2022/06/16 09:06:00 UTC

[jira] [Closed] (WW-2255) Field validators should be skipped if there is a conversion error

     [ https://issues.apache.org/jira/browse/WW-2255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart closed WW-2255.
-----------------------------
    Fix Version/s:     (was: 6.1.0)
       Resolution: Not A Problem

> Field validators should be skipped if there is a conversion error
> -----------------------------------------------------------------
>
>                 Key: WW-2255
>                 URL: https://issues.apache.org/jira/browse/WW-2255
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: XML Validators
>            Reporter: Adam Crume
>            Priority: Major
>         Attachments: ConversionErrorInterceptor2.java
>
>
> If there is an error converting a field, the validators for that field should be skipped.  For example, let's say I have an action with an "age" field declared as an Integer, and the field is required.  If the user enters "one", the user will see two errors: one from the conversion process, and one from the required validator (since the field was never assigned).
> In general, a conversion error should short-circuit all validators for that field, since validators depend on the field being set, which never happens if there was a conversion error.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)