Class sfCustomUniqueValidator

Description

sfCustomUniqueValidator checks if a record exist in the database with all the mentionned fields.

ex: Check if a companie with company_name exist in country_id class: sfCustomUniqueValidator param: class: Companies //the class on which the search is performed nb_fields: 2 //the number of fields on which the comparison is done field_1: company_name //First field of the comparison field_2: country_id //Other country for the comparison

  • author: Joachim Martin

Located in /apps/frontend/lib/sfCustomUniqueValidator.php (line 18)

sfValidator
   |
   --sfCustomUniqueValidator
Method Summary
bool execute (mixed &$value, error &$error)
void initialize ( $context, [ $parameters = null])
Methods
execute (line 29)

Executes this validator.

  • return: true, if this validator executes successfully, otherwise false
  • access: public
bool execute (mixed &$value, error &$error)
  • mixed &$value: A file or parameter value/array
  • error &$error: An error message reference
initialize (line 86)
  • access: public
void initialize ( $context, [ $parameters = null])
  • $context
  • $parameters

Documentation generated on Sat, 21 Mar 2009 21:24:58 +0100 by phpDocumentor 1.4.2