public void validate(FacesContext context,
                         UIComponent component,
                         Object value) {

        if (UIInput.isEmpty(value)) {
            FacesMessage msg;
            String requiredMessageStr = null;
            if (component instanceof UIInput) {
                requiredMessageStr = ((UIInput) component).getRequiredMessage();
            }

            // respect the message string override on the component to emulate required="true" behavior
            if (requiredMessageStr != null) {
                msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, requiredMessageStr, requiredMessageStr);
            }
            else {
                msg = MessageFactory.getMessage(context, UIInput.REQUIRED_MESSAGE_ID,
                    MessageFactory.getLabel(context, component));
            }

            throw new ValidatorException(msg);
        }
    }
public void validate ( FacesContext context , UIComponent component , Object value ) { if ( UIInput . isEmpty ( value ) ) { FacesMessage msg ; String requiredMessageStr = null ; if ( component instanceof UIInput ) { requiredMessageStr = ( ( UIInput ) component ) . getRequiredMessage ( ) ; } if ( requiredMessageStr != null ) { msg = new FacesMessage ( FacesMessage . SEVERITY_ERROR , requiredMessageStr , requiredMessageStr ) ; } else { msg = MessageFactory . getMessage ( context , UIInput . REQUIRED_MESSAGE_ID , MessageFactory . getLabel ( context , component ) ) ; } throw new ValidatorException ( msg ) ; } }
</p>Verify that the converted object value is not null.</p>

@param context {@inheritDoc}
@param component {@inheritDoc}
@param value {@inheritDoc}

@throws ValidatorException   {@inheritDoc}