[ 
http://www.stripesframework.org/jira/browse/STS-868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741#comment-12741
 ] 

Ben Gunter commented on STS-868:
--------------------------------

If, indeed, I did misunderstand what you are saying then I still don't see what 
the problem is. I'll retest if you submit a complete web app to demonstrate the 
problem.

> 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
>            Assignee: Ben Gunter
>            Priority: Critical
>         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

        

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to