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

Ben Gunter resolved STS-537.
----------------------------

    Resolution: Fixed

Values are always trimmed by default during validation, type conversion and 
binding. This behavior can be overridden by setting @Validate(trim=false). For 
reasons that have been explained in depth on the mailing list, there will be no 
global option to turn this behavior on or off. If someone finds that they need 
to revert to the old behavior, then they can override 
DefaultActionBeanPropertyBinder.trim(String[], ValidationMetadata) to simply 
return the value unchanged.

> @Validate should support trim
> -----------------------------
>
>                 Key: STS-537
>                 URL: http://www.stripesframework.org/jira/browse/STS-537
>             Project: Stripes
>          Issue Type: New Feature
>          Components: Validation
>    Affects Versions: Release 1.4.3
>         Environment: All
>            Reporter: Alan Burlison
>            Assignee: Ben Gunter
>             Fix For: Release 1.5
>
>
> The maxlength and minlength @Validate parameters include any leading and 
> trailing whitespace when they calculate the length of a field, similarly the 
> required parameter will treat a field containing just spaces as if it is 
> valid.  To rectify this, it is proposed to add a new boolean parameter to 
> @Validate: trim.  If set, the contents of the field will be trimmed of 
> leading and trailing spaces before performing the other validation checks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to