You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Chris Norris (JIRA)" <ta...@jakarta.apache.org> on 2005/10/03 20:49:54 UTC

[jira] Created: (TAPESTRY-687) Required validator doesn't work with the Upload component

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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Updated: (TAPESTRY-687) Required validator doesn't work with the Upload component

Posted by "Chris Norris (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-687?page=all ]

Chris Norris updated TAPESTRY-687:
----------------------------------

    Attachment: patch.txt

> 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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-687) Required validator doesn't work with the Upload component

Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-687?page=all ]
     
Jesse Kuhnert resolved TAPESTRY-687:
------------------------------------

    Fix Version: 4.0.1
     Resolution: Fixed

Patch applied, thank you.

> 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
>      Fix For: 4.0.1
>  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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org