[
https://issues.apache.org/struts/browse/WW-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45978#action_45978
]
Wes Wannemacher commented on WW-2934:
-------------------------------------
I would say that whether this is a "big issue" is a matter of perspective.
Changing a core behavior of the framework may not be welcome by many users.
What you are saying makes logical sense, so I would say that this might be
served better as a configurable behavior. This way application behavior for
existing applications is unchanged, but if want this sort of behavior you could
certainly change the configuration. I don't know how much time other devs have
to work on this, but if you want to take a crack at it, then look through the
Validation, Parameters and Conversion Error interceptors and see how it could
be implemented. A patch would be great!
> conversion error should short-circuit all validators
> -----------------------------------------------------
>
> Key: WW-2934
> URL: https://issues.apache.org/struts/browse/WW-2934
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7,
> 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.13, 2.0.14,
> 2.1.0, 2.1.1, 2.1.2
> Reporter: Noel Hernández
> Priority: Critical
>
> 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.
> Validators are essential for real world projects, this is a big issue with
> struts2.
> look at stripes framework for a good designed validator framework.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.