symfony API

sfValidatorPropelChoice 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.

sfValidatorPropelChoice validates that the value is one of the rows of a table.

Inheritence

sfValidatorPropelChoiceMany  <  sfValidatorPropelChoice  <  sfValidatorBase

Method Summary

  • configure($options = array(), $messages = array())
    Configures the current validator.
  • doClean($value)
  • string getColumn()
    Returns the column to use for comparison.

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

  • configure ($options = array(), $messages = array()) Browse code

    $options
    $messages

    Configures the current validator.


    Available options:

    * model: The model class (required)
    * criteria: A criteria to use when retrieving objects
    * column: The column name (null by default which means we use the primary key) must be in field name format
    * connection: The Propel connection to use (null by default)
    * multiple: true if the select tag must allow multiple selections

  • doClean ($value) Browse code

    $value

  • (string) getColumn () Browse code

    Returns the column to use for comparison.


    The primary key is used by default.

    returns The column name