This is elementary Java... you should probably use an IDE like eclipse, works much better than finding errors later on with a build tool like ant. You're declaring a method and you don't declare it's return type... add the workd "void" before validate... the compiler gives you the exact location of the problem...

Regards,
Sebastiaan

Fabien D. wrote:
Thank you all for your help,

There is no problem for the password, but now I'm trying to create my own
validator. I have a problem during compilation (with ant).

I have done this :

        email.add(new IValidator() {
                validate(IValidatable v) {
                        if ( !CDataVerification.validEmail( 
(String)v.getvalue() ) )
v.add(new ValidationError().addMessageKey("error")); } });

where CDataVerification.validEmail is a method to check if it's a correct
email ( with @, "." , ...), in input a string and in output a boolean.

During compilation, I have this message : invalid method declaration; return
type required  validate(IValidatable v)

In the java doc, the method validate don't have any return type, that's why
I don't understand what is my mistake.

Thank you for your help.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to