hello.
I need a unique validation with 2 entry.
For instance: company and country (can't have two company_1 in
country_1,
unique key(company, country)).

So, I take this sneppet:
         http://www.symfony-project.org/snippets/snippet/195
But I have a problem in this line:
    $check_value = $this->getContext()->getRequest()-
>getParameter($check_param);

$check_param have a value (the name of field) but $check_value don't
return any,
and the criteria can't execute:
            //If check value defined
            if ($check_value != '') {
                //Adding field to the criteria
                $columnName = call_user_func(array($className,
'translateFieldName'), $check_param, BasePeer::TYPE_FIELDNAME,
BasePeer::TYPE_COLNAME);
                $c->add($columnName, $check_value);
            }

my edit.yml:
companyUniqueValidator:
  class:            sfCustomUniqueValidator
  param:
    class:          Tblcompany
    nb_fields:      2
    field_1:        company
    field_2:        country

Where are the problem?
Thanks, sorry my bad English.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to