Hello You have to specify a constraint : validate="require,uppercase=..."
If you want to create a validator without any specific constraint (like the required validator which describes itself as a constraint), use Void for constraint type: public class UpperCase extends AbstractValidator<Void, Object> ... Christophe. -----Message d'origine----- De : Angelo Chen [mailto:[EMAIL PROTECTED] Envoyé : vendredi 21 mars 2008 12:06 À : users@tapestry.apache.org Objet : RE: T5: contributing a validator? Hi, You are correct, it is called when it is used, however I got this error: [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: Could not convert 'required,upperCase' into a component parameter binding: Validator 'upperCase' requires a validation constraint (of type java.lang.String) but none was provided. org.apache.tapestry.ioc.internal.util.TapestryException: Could not convert 'required,upperCase' into a component parameter binding: Validator ' .java public class TestValidator { @Property private String name; @Component private Form test; public void onValidateForm() throws EncoderException { System.out.println("validate"); } } .tml < t:form t:id="test"> < input t:type="textfield" t:id="name" t:validate="required, upperCase" /> < input t:type="submit" t:id="submit" /> < /t:form> Cordenier Christophe wrote: > > Hello > > Can you give us the code that uses your validator ? > > The service is loaded only when needed (and so its "contribute" methods) > At least, I think that every service that is not "EAGER" is loaded only > when needed. > > Christophe. > > -----Message d'origine----- > De : Angelo Chen [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 21 mars 2008 07:23 > À : users@tapestry.apache.org > Objet : T5: contributing a validator? > > > > -- View this message in context: http://www.nabble.com/T5%3A-contributing-a-validator--tp16194294p16196729.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.