javax.faces.validator
Class RequiredValidator

java.lang.Object
  extended by javax.faces.validator.RequiredValidator
All Implemented Interfaces:
EventListener, Validator

@JSFValidator(name="f:validateRequired",
              bodyContent="empty")
@JSFJspProperty(name="binding",
                returnType="javax.faces.validator.RequiredValidator",
                longDesc="A ValueExpression that evaluates to a RequiredValidator.")
public class RequiredValidator
extends Object
implements Validator

Check if a value is empty, in the same way as set UIInput required property to true (including all rules related to this property).

Since:
2.0

Field Summary
static String VALIDATOR_ID
           
 
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
 
Constructor Summary
RequiredValidator()
           
 
Method Summary
 void validate(FacesContext facesContext, UIComponent uiComponent, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATOR_ID

public static final String VALIDATOR_ID
See Also:
Constant Field Values
Constructor Detail

RequiredValidator

public RequiredValidator()
Method Detail

validate

public void validate(FacesContext facesContext,
                     UIComponent uiComponent,
                     Object value)
              throws ValidatorException
Specified by:
validate in interface Validator
Throws:
ValidatorException


Copyright © 2014 The Apache Software Foundation. All rights reserved.