symfony API

sfValidatorSchemaCompare Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.2 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.

sfValidatorSchemaCompare compares several values from an array.

Inheritence

sfValidatorSchemaCompare  <  sfValidatorSchema < sfValidatorBase

Method Summary

  • asString($indent)
  • doClean($values)
  • __construct($leftField, $operator, $rightField, $options = array(), $messages = array())
    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 , setDefaultMessages , setDefaultOptions , setInvalidMessage , setMessage , setMessages , setOption , setOptions , setRequiredMessage , __construct

Method Details

  • asString ($indent) Browse code

    $indent

  • doClean ($values) Browse code

    $values

  • __construct ($leftField, $operator, $rightField, $options = array(), $messages = array()) 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::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