1.

What Is The Purpose Of @emailvalidator Annotation?

Answer»

This validation annotation checks that a field is a valid e-mail address if it contains a non-empty String.

public class Employee extends ActionSupport{

@EmailValidator(MESSAGE = "DEFAULT message", 

KEY = "i18n.key", shortCircuit = TRUE)

public String getEmail() {

return email;

}

}

This validation annotation checks that a field is a valid e-mail address if it contains a non-empty String.

public class Employee extends ActionSupport{

@EmailValidator(message = "Default message", 

key = "i18n.key", shortCircuit = true)

public String getEmail() {

return email;

}

}



Discussion

No Comment Found