I have this custom validator:

            fileUploadField.add(new IValidator() {
                public void validate(IValidatable validatable) {
                    String input = (String) validatable.getValue();
                    if (!luceneService.isSupportedFormat(input))
                        error(getString("LuceneFileNameValidator.invalidFile
"));
                }
            });

and it works fine.

For your situation, maybe you could ask to see if "input" is not null, and
if it is, add an error message.

Regards,
-- 
Bruno Borges
blog.brunoborges.com.br
+55 1185657739

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld

On 10/22/07, Edi <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I have created one FileUploadField upload button. Support I do not select
> any file, It should be validated. How?
>
> I know fileuploadButtonName.setRequired(true);
>
> But I did not get any validation messages. How can I add validation
> message
> for FileUploadField button?
>
> Thanking You
>
> --
> View this message in context:
> http://www.nabble.com/How-to-validate-wicket-FileUploadField--tf4669821.html#a13339893
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to