[ http://mc4j.org/jira/browse/STS-394?page=comments#action_10752 ] 
            
Andrew Glover commented on STS-394:
-----------------------------------

I am having the same issue with String fields.  

I would suggest that either all fields are trimmed during validation in 
net.sourceforge.stripes.controller.DefaultActionBeanPropertyBindercheck on line 
698 (stripes version 1.4.3)  i.e.
    if (value.trim().length() == 0) { ....}

or a new annotation is added 
requiredAndTrim=true/false.

Though I personally can't think of when you would required a value to be 
entered but then allow the user to enter only spaces.
Thanx, Andrew

> Validator doesnot trim the value entered before doing validation 
> -----------------------------------------------------------------
>
>                 Key: STS-394
>                 URL: http://mc4j.org/jira/browse/STS-394
>             Project: Stripes
>          Issue Type: Bug
>          Components: Validation
>         Environment: All browsers, Operating System - Window XP.
>            Reporter: PAT
>         Assigned To: Tim Fennell
>
> We have a text box and for that value provided a default validation saying 
> (required=true), in this case non-null, non-empty value must be submitted for 
> the field. When we donot provide a value proper validation happens and error 
> message is dispalyed. But if we provide blank spaces and submit the form; no 
> validation error is submitted.
> In the above case if proper trimmig is done then proper validation will be 
> done.
> So I guess before validating  'Trimming' of value has also to be done. 

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

        

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to