You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "josee dufour (JIRA)" <ji...@apache.org> on 2010/03/29 23:38:27 UTC

[jira] Issue Comment Edited: (VALIDATOR-281) Indexed property validation stops on first failed element

    [ https://issues.apache.org/jira/browse/VALIDATOR-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851114#action_12851114 ] 

josee dufour edited comment on VALIDATOR-281 at 3/29/10 9:37 PM:
-----------------------------------------------------------------

Hi I have the same problem with the latest version of the common-validator (1.3.1) looks like the fix has not been promote to any futher verson ??? !!!

      was (Author: jdufour):
    Hi I have the same problem with the latest version of the common-validator (1.3.1) looks like the fix has not been push futher ????!!!
  
> Indexed property validation stops on first failed element
> ---------------------------------------------------------
>
>                 Key: VALIDATOR-281
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-281
>             Project: Commons Validator
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: 1.1.4 Release
>            Reporter: Lorenzo Dee
>            Priority: Trivial
>         Attachments: Field.java
>
>
> I'm using Struts 1.2.9 and its validator framework. The validation of an indexed property stops on the first element that fails vaildation. For example, the following list of postal addresses is being validated:
> addr[0].city
> addr[0].state
> addr[0].zip
> addr[1].city
> addr[1].state
> addr[1].zip
> addr[2].city
> addr[2].state
> addr[2].zip
> My validation.xml contains something like:
> <form name="...">
>     <field property="city" indexedListProperty="addresses" depends="...">
>         . . .
>     </field>
> </form>
> When validating the city fields, it would go from addresses[0].city upto addresses[2].city. But when validation fails at addr[0].city, the rest is not being validated anymore (i.e. addr[1].city and addr[2].city are not validated). It would be better if addr[1].city and addr[2].city fields are validated, even if one of them fails.
> Note that this behavior also affects state and zip fields. Say for example, if addr[1].state fails validation, it will no longer continue to validate addr[2].state.

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