Required validator doesn't work with the Upload component
---------------------------------------------------------

         Key: TAPESTRY-687
         URL: http://issues.apache.org/jira/browse/TAPESTRY-687
     Project: Tapestry
        Type: Bug
  Components: Framework  
    Versions: 4.0    
    Reporter: Chris Norris
    Priority: Critical
 Attachments: patch.txt

The org.apache.tapestry.form.validator.Required class can be used for the 
Upload component, but does nothing.  The object parameter passed in to 
validate() will always be a non-null UploadPart, but will return a getSize() of 
0.  So if a user enters "alsdkfjlaskdfj02/:" as a file path in an upload 
component with validators="validators:required", nothing will be marked as 
errored.

I'm not sure if the Required validator is supposed to work for all things, but 
I see that it has different conditions for Strings and Collections.  I created 
a patch that works with UploadPart objects as well.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to