/** * methode that validates an email-address. * it uses the commons-validator */ public void validate( FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException { if (facesContext == null) throw new NullPointerException("facesContext"); if (uiComponent == null) throw new NullPointerException("uiComponent"); if (value == null) { return; } if (!GenericValidator.isEmail(value.toString().trim())) { Object[] args = {value.toString()}; throw new ValidatorException(getFacesMessage(EMAIL_MESSAGE_ID, args)); } }
/** * methode that validates an email-address. * it uses the commons-validator */ public void validate( FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException { if (facesContext == null) throw new NullPointerException("facesContext"); if (uiComponent == null) throw new NullPointerException("uiComponent"); if (value == null) { return; } if (!GenericValidator.isEmail(value.toString().trim())) { Object[] args = {value.toString()}; throw new ValidatorException(getFacesMessage(EMAIL_MESSAGE_ID, args)); } }
/** * methode that validates an email-address. * it uses the commons-validator */ public void validate( FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException { if (facesContext == null) { throw new NullPointerException("facesContext"); } if (uiComponent == null) { throw new NullPointerException("uiComponent"); } if (value == null) { return; } if (!GenericValidator.isEmail(value.toString().trim())) { Object[] args = {value.toString()}; throw new ValidatorException(getFacesMessage(EMAIL_MESSAGE_ID, args)); } }