[ 
http://www.stripesframework.org/jira/browse/STS-868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter updated STS-868:
---------------------------

    Fix Version/s: Release 1.5.7

> Errors occured on null or not present indexed properties if required 
> parameter is used within @ValidateNestedProperties
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: STS-868
>                 URL: http://www.stripesframework.org/jira/browse/STS-868
>             Project: Stripes
>          Issue Type: Bug
>          Components: Validation
>    Affects Versions: Release 1.5.6
>            Reporter: Haggi
>            Priority: Critical
>             Fix For: Release 1.5.7
>
>         Attachments: DefaultActionBeanPropertyBinder.java, 
> DefaultValidationMetadataProvider.java, 
> DefaultValidationMetadataProvider.java, ValidationMetadata.java
>
>
> If you use the @ValidateNestedProperties annotation and some of your nested 
> properties are required, you will get validation errors even the index 
> property is null or not present in the request.
> The Documentation at 
> http://www.stripesframework.org/display/stripes/Indexed+Properties says:
> {quote}
> .. Required field validations are only applied if at least one value with the 
> same index was supplied. To understand this it is easier to think of indexed 
> properties as a mechanism for creating multi-row forms. And this change means 
> that rows in the form that are completely empty are ignored.
> {quote}
> The nested validation below whould raise a validation error "name is 
> required" even the indexed property books is not present in the request 
> (null).
> {code}
> @ValidateNestedProperties({
>    @Validate(field = "name", required = true, maxlength = 100),
>    @Validate(field = "description", maxlength = 255)
> })
> private List<Book> books;
> {code}
> I fixed this problem and attached the modified classes.
> @BenGunter: is the stripes project dead??

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to