public class RequiredValidator extends Object implements Validator
A Validator that checks for an empty value in the same way that UIInput checks for a value. In fact, this validator is equivalent to setting the required attribute on the input component to true.
| Modifier and Type | Field and Description | 
|---|---|
static String | 
VALIDATOR_ID
The standard converter id for this converter. 
 | 
NOT_IN_RANGE_MESSAGE_ID| Constructor and Description | 
|---|
RequiredValidator()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
validate(FacesContext context,
        UIComponent component,
        Object value)
Verify that the converted object value is not null. 
 | 
public static final String VALIDATOR_ID
The standard converter id for this converter.
public void validate(FacesContext context, UIComponent component, Object value)
validate in interface Validatorcontext - FacesContext for the request we are processingcomponent - UIComponent we are checking for correctnessvalue - the value to validateValidatorException - if validation failsCopyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.