javax.faces.validator
Class RequiredValidator
java.lang.Object
javax.faces.validator.RequiredValidator
All Implemented Interfaces: java.util.EventListener, Validator
public class RequiredValidator extends java.lang.Objectimplements 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.
Since:
2.0
Field Summary
static java.lang.String
VALIDATOR_ID
The standard converter id for this converter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
VALIDATOR_ID
public static final java.lang.String VALIDATOR_ID
The standard converter id for this converter.
See Also: Constant Field Values
RequiredValidator
public RequiredValidator ()
validate
public void validate (FacesContext context,
UIComponent component,
java.lang.Object value)
Verify that the converted object value is not null.
Specified by: validate
in interface Validator
Parameters: context
- FacesContext for the request we are processingcomponent
- UIComponent we are checking for correctnessvalue
- the value to validate
Throws:
ValidatorException
- if validation fails
Submit a bug or feature Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41
Scripting on this page tracks web page traffic,
but does not change the content in any way.