symfony API

sfValidatorSchemaCompare Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

sfValidatorSchemaCompare compares several values from an array.

Inheritence

sfValidatorSchemaCompare  <  sfValidatorSchema < sfValidatorBase

Method Summary

  • asString()
    @see sfValidatorBase
  • doClean()
    @see sfValidatorBase
  • __construct($leftField, $operator, $rightField, $options, $messages)
    Constructor.

Methods inherited from sfValidatorSchema

asString , clean , configure , doClean , getBytes , getFields , getPostValidator , getPreValidator , offsetExists , offsetGet , offsetSet , offsetUnset , postClean , preClean , setPostValidator , setPreValidator , __clone , __construct

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

  • asString () Browse code

    @see sfValidatorBase

  • doClean () Browse code

    @see sfValidatorBase

  • __construct ($leftField, $operator, $rightField, $options, $messages) Browse code

    $leftField The left field name
    $operator The operator to apply
    $rightField The right field name
    $options An array of options
    $messages An array of error messages

    Constructor.


    Available options:

    * left_field: The left field name
    * operator: The comparison operator
    * self::EQUAL
    * self::NOT_EQUAL
    * self::IDENTICAL
    * self::NOT_IDENTICAL
    * self::LESS_THAN
    * self::LESS_THAN_EQUAL
    * self::GREATER_THAN
    * self::GREATER_THAN_EQUAL
    * right_field: The right field name
    * throw_global_error: Whether to throw a global error (false by default) or an error tied to the left field