Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想验证数据库中的用户名以检查天气或用户名是否已经注册
您可以为此使用 sfValidatorDoctrineUnique()。使用示例:
new sfValidatorDoctrineUnique(array('model' => 'sfGuardUser', 'column' => array('username')), array('invalid'=>$this->__('Email is registrated')))