You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pankaj Gupta <Pa...@hsc.com> on 2006/10/05 09:45:33 UTC

File Upload validation

Hi,

I want to do client side validation for file upload such that if the file 
does not exist or the field is left blank it should show an error. Please 
suggest how I can do that.

regards,
Pankaj

Re: File Upload validation

Posted by Chris Pratt <th...@gmail.com>.
If you are using the validation framework, you can use the <html:javascript
form="formname"/> tag to do that.
  (*Chris*)

On 10/5/06, Patil, Sheetal <pa...@diebold.com> wrote:
>
> U cant enter client side validation for file present or empty rather u
> can restrict to enter data manually typing (offcource in javascript).
> like
> <html:form onkeypress="return false"/>
> Better to put validation on server side apart from this
> -----Original Message-----
> From: Pankaj Gupta [mailto:Pankaj.Gupta@hsc.com]
> Sent: Thursday, October 05, 2006 1:16 PM
> To: Struts Users Mailing List
> Subject: File Upload validation
>
> Hi,
>
> I want to do client side validation for file upload such that if the
> file does not exist or the field is left blank it should show an error.
> Please suggest how I can do that.
>
> regards,
> Pankaj
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: File Upload validation

Posted by "Patil, Sheetal" <pa...@diebold.com>.
U cant enter client side validation for file present or empty rather u
can restrict to enter data manually typing (offcource in javascript).
like
<html:form onkeypress="return false"/>
Better to put validation on server side apart from this
-----Original Message-----
From: Pankaj Gupta [mailto:Pankaj.Gupta@hsc.com] 
Sent: Thursday, October 05, 2006 1:16 PM
To: Struts Users Mailing List
Subject: File Upload validation

Hi,

I want to do client side validation for file upload such that if the
file does not exist or the field is left blank it should show an error.
Please suggest how I can do that.

regards,
Pankaj

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org