Save This Page
Home » xwork-2.1.1-src » com.opensymphony.xwork2.validator.validators » [javadoc | source]
com.opensymphony.xwork2.validator.validators
public class: RequiredFieldValidator [javadoc | source]
java.lang.Object
   com.opensymphony.xwork2.validator.validators.ValidatorSupport
      com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
         com.opensymphony.xwork2.validator.validators.RequiredFieldValidator

All Implemented Interfaces:
    FieldValidator, ShortCircuitableValidator, Validator

RequiredFieldValidator checks if the specified field is not null.


<validators>

<!-- Plain Validator Syntax -->
<validator type="required">
<param name="fieldName">username</param>
<message>username must not be null</message>
</validator>


<!-- Field Validator Syntax -->
<field name="username">
<field-validator type="required">
<message>username must not be null</message>
</field-validator>
</field>

</validators>

Fields inherited from com.opensymphony.xwork2.validator.validators.ValidatorSupport:
log,  defaultMessage,  messageKey
Method from com.opensymphony.xwork2.validator.validators.RequiredFieldValidator Summary:
validate
Methods from com.opensymphony.xwork2.validator.validators.FieldValidatorSupport:
getFieldName,   getValidatorType,   setFieldName,   setValidatorType
Methods from com.opensymphony.xwork2.validator.validators.ValidatorSupport:
addActionError,   addFieldError,   conditionalParse,   getDefaultMessage,   getFieldValue,   getMessage,   getMessageKey,   getParse,   getValidatorContext,   getValidatorType,   isShortCircuit,   setDefaultMessage,   setMessageKey,   setParse,   setShortCircuit,   setValidatorContext,   setValidatorType,   setValueStack
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.xwork2.validator.validators.RequiredFieldValidator Detail:
 public  void validate(Object object) throws ValidationException