symfony API

sfValidatorDoctrineUnique Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.3 API OpenSearch

Packages

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

sfValidatorDoctrineUnique validates that the uniqueness of a column.

Inheritence

sfValidatorDoctrineUnique  <  sfValidatorSchema < sfValidatorBase

Method Summary

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 , setInvalidMessage , setMessage , setMessages , setOption , setOptions , setRequiredMessage , __construct

Method Details

  • configure () Browse code

    Configures the current validator.


    Available options:

    * model: The model class (required)
    * column: The unique column name in Doctrine field name format (required)
    If the uniquess is for several columns, you can pass an array of field names
    * primary_key: The primary key column name in Doctrine field name format (optional, will be introspected if not provided)
    You can also pass an array if the table has several primary keys
    * connection: The Doctrine connection to use (null by default)
    * throw_global_error: Whether to throw a global error (false by default) or an error tied to the first field related to the column option array

  • doClean () Browse code

    @see sfValidatorBase

  • (array) getPrimaryKeys () Browse code

    Returns the primary keys for the model.

    returns An array of primary keys

  • isUpdate (, , ) Browse code

    Returns whether the object is being updated.

  • __construct (, ) Browse code

    Constructor.