u could make the field unique in your schema On May 22, 5:00 am, Ethan <ruanx...@gmail.com> wrote: > hello,everyone, > i created a register form: > class RegForm extends sfForm{ > public function configure(){ > $this->setWidgets(array( > ... > 'email'=> new > sfWidgetFormInputText(array('label'=>'email address:','default'=>'@')), > .... > )); > $this->setValidators(array( > ... > 'email'=>new > sfValidatorEmail(array(),array('required'=>'Email cannot > empty','invalid'=>'Email invalid')), > ... > )); > $this->setValidator('email',new > sfValidatorPropelUnique(array('model'=>'Userinfo','column'=>array('Uemail')),array('invalid'=>'email > EXISTS.'))); > }} > > and i want to check whether email address existed in db before user > register. according to document, it seems need to use *sfValidatorPropelUnique > *,but when i try to add the red code, i received an error > You must pass an array parameter to the clean() method (this validator can > only be used as a post validator). > can someone told me the right way to do this process? > > ------------------------------------------ > 少许诺多兑现 > ------------------------------------------
-- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en