0 with eclipse and glassfish, in fact i have added a custom validator to validate emai address, and i am getting class not found exception. although i have registered in faces.config too.
here is my validator code
public static final String EmailPattern= "^[_A-Za-z0-9-]+(\\." +
"[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*" +
"(\\.[A-Za-z]{2,})$";
public void validate(FacesContext context, UIComponent component,
Object value) throws ValidatorException {
matcher = pattern.matcher(value.toString());
if(!matcher.matches())
{
FacesMessage message = new FacesMessage("Please enter a valid email address");
message.setSeverity(FacesMessage.SEVERITY_ERROR);
throw new ValidatorException(message);
}
}
i registerd in faces.config
<validator>
<validator-id>emailvalidator</validator-id>
<validator-class>com.jsf.validators.EmailValidator</validator-class>
</validator>
does someone know what is the problem in it.