xianwinwin wrote:
I would like to validate if the user has entered a valid email. for this I have the method@TypeConversion(converter = "com.utilities.conversion.EmailTypeConversion") public void setEmail(String email) { this.email = email; } the conversion (where I'm a bit perplexed) is: .. .. @Override public String convertToString(Map context, Object o) { System.out.println("hey - I'm checking the convert to string!!!"); boolean isEmailValid = ValidateEmail.isEmailValid(values[0]); //what comes here????? ?? } assuming the isEmailValid is false, how can I advise that the validation failed?thanks
Why are you trying to do validation with a type converter? If you want to validate that the user has entered a valid email, use validation -- specifically, the email validator:
http://struts.apache.org/2.x/docs/validation.html http://struts.apache.org/2.x/docs/email-validator.html L. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

