symfony API

sfValidatorAnd Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to API menu


You are currently browsing the symfony API for the 1.4 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfValidatorAnd validates an input value if all validators passes.


sfValidatorAnd  <  sfValidatorBase

Method Summary

Methods inherited from sfValidatorBase

addMessage , addOption , addRequiredOption , asString , clean , configure , doClean , getCharset , getDefaultMessages , getDefaultOptions , getEmptyValue , getErrorCodes , getMessage , getMessages , getMessagesWithoutDefaults , getOption , getOptions , getOptionsWithoutDefaults , getRequiredOptions , hasOption , isEmpty , setCharset , setDefaultMessage , setDefaultMessages , setDefaultOptions , setMessage , setMessages , setOption , setOptions , __construct

Method Details

  • addValidator ($validator)

    $validator A sfValidatorBase instance

    Adds a validator.

  • asString ()

    @see sfValidatorBase

  • configure ($options, $messages)

    $options An array of options
    $messages An array of error messages

    Configures the current validator.

    Available options:

    * halt_on_error: Whether to halt on the first error or not (false by default)

  • doClean ()

    @see sfValidatorBase

  • (array) getValidators ()

    Returns an array of the validators.

    returns An array of sfValidatorBase instances

  • __construct ($validators, $options, $messages)

    $validators Initial validators
    $options An array of options
    $messages An array of error messages


    The first argument can be:

    * null
    * a sfValidatorBase instance
    * an array of sfValidatorBase instances