Could you post a testpage? Usually file inputs work just fine, see
this demo: http://jquery.bassistance.de/validate/demo/errorcontainer-demo.html

Jörn

On Thu, Sep 25, 2008 at 4:03 PM, Adam <[EMAIL PROTECTED]> wrote:
>
> I'm trying to validate that someone has selected a file for upload
> before submitting a form.  I set the required class on the input
> element, but it's not being validated.  The regular text input is
> validated, however.
>
>
> <form:form id="pictureform" commandName="pictureCommand"
>        action="${actionURL}" method="post" enctype="multipart/form-data"
>        cssClass="update">
>        <div>
>                <label for="title">
>                        Title:
>                </label>
>                <form:input path="title" cssClass="required" />
>        </div>
>
>        <div>
>                <label for="description">
>                        Description:
>                </label>
>                <form:textarea path="description" />
>        </div>
>
>        <label for="image">
>                Select File:
>        </label>
>        <input type="file" name="image" cssClass="required" />
>        <input type="submit" value="Add" />
> </form:form>
>
>

Reply via email to