当前位置: 首页>>代码示例>>PHP>>正文


PHP RulesChecker::isUnique方法代码示例

本文整理汇总了PHP中Cake\ORM\RulesChecker::isUnique方法的典型用法代码示例。如果您正苦于以下问题:PHP RulesChecker::isUnique方法的具体用法?PHP RulesChecker::isUnique怎么用?PHP RulesChecker::isUnique使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cake\ORM\RulesChecker的用法示例。


在下文中一共展示了RulesChecker::isUnique方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['username']));
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->existsIn(['department_id'], 'Departments'));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     return $rules;
 }
开发者ID:posdawpmv,项目名称:sad360,代码行数:15,代码来源:UsersTable.php

示例2: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['username']));
     //Same email should be allowed in contact form
     //$rules->add($rules->isUnique(['email']));
     return $rules;
 }
开发者ID:esaul314,项目名称:norn-cms,代码行数:14,代码来源:UsersTable.php

示例3: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->isUnique(['username']));
     //   $rules->add($rules->existsIn(['facebook_id'], 'Facebooks'));
     return $rules;
 }
开发者ID:webroup17,项目名称:social_networking,代码行数:14,代码来源:UsersTable.php

示例4: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['username']));
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->isUnique(['matricula']));
     return $rules;
 }
开发者ID:daniels85,项目名称:SGL,代码行数:14,代码来源:UsersTable.php

示例5: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['username']));
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->existsIn(['role_id'], 'Roles'));
     return $rules;
 }
开发者ID:alaxos,项目名称:alaskyzer,代码行数:14,代码来源:UsersTable.php

示例6: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  *  application integrity
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['title']));
     $rules->add($rules->isUnique(['slug']));
     $rules->add($rules->existsIn(['parent_id'], 'Parents'));
     return $rules;
 }
开发者ID:mirko-pagliai,项目名称:me-cms,代码行数:13,代码来源:PagesCategoriesTable.php

示例7: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['username'], 'Tài khoản đã được đăng ký'));
     $rules->add($rules->isUnique(['email'], 'Email đã được đăng ký'));
     $rules->add($rules->existsIn(['role_id'], 'Roles', 'Role không hợp lệ'));
     return $rules;
 }
开发者ID:ansidev,项目名称:cakephp_blog,代码行数:14,代码来源:UsersTable.php

示例8: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     // Patikriname ar įvestas elektroninio pašto adersas nesikartoja duomenų bazėje.
     $rules->add($rules->isUnique(['email'], "Company email address already exist in our database."));
     $rules->add($rules->isUnique(['name'], "Company name already exist in our database."));
     return $rules;
 }
开发者ID:harolato,项目名称:aviasolutions,代码行数:14,代码来源:CompaniesTable.php

示例9: buildRules

 /**
  * Application rules.
  *
  * @param \Cake\ORM\RulesChecker $rules The rule checker
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     // unique mail
     $rules->add($rules->isUnique(['email'], __d('user', 'e-mail already in use.')));
     // unique username
     $rules->add($rules->isUnique(['username'], __d('user', 'Username already in use.')));
     return $rules;
 }
开发者ID:quickapps-plugins,项目名称:user,代码行数:14,代码来源:UsersTable.php

示例10: buildRules

 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['username']));
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->existsIn(['user_type_id'], 'UserTypes'));
     $rules->add($rules->existsIn(['client_contact_id'], 'ClientContacts'));
     $rules->add($rules->existsIn(['client_info_id'], 'ClientInfos'));
     return $rules;
 }
开发者ID:julkar9,项目名称:ntrack,代码行数:9,代码来源:UsersTable.php

示例11: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->existsIn(['student_id'], 'Students'));
     $rules->add($rules->existsIn(['test_id'], 'Tests'));
     $rules->add($rules->isUnique(['student_id', 'test_id'], 'Cet étudiant a déja participé à cet examen'));
     return $rules;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:14,代码来源:StudentsTestsTable.php

示例12: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->existsIn(['group_id'], 'Groups'));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     $rules->add($rules->isUnique(['group_id', 'user_id']), ['errorField' => 'User', 'message' => 'User is already part of the group!!']);
     return $rules;
 }
开发者ID:Nandox7,项目名称:StudentCentral,代码行数:14,代码来源:GroupUsersTable.php

示例13: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->existsIn(['node_code_id'], 'Nodes'));
     $rules->add($rules->existsIn(['data_type_id'], 'DataTypes'));
     $rules->add($rules->isUnique(['node_code_id', 'data_type_id']));
     return $rules;
 }
开发者ID:Krelyx,项目名称:hub,代码行数:14,代码来源:SensorsTable.php

示例14: buildRules

 /**
  * Returns a rules checker object that will be used for validating
  * application integrity.
  *
  * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
  * @return \Cake\ORM\RulesChecker
  */
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->existsIn(['entreprises_id'], 'Entreprises'));
     $rules->add($rules->existsIn(['profil_id'], 'Profils'));
     return $rules;
 }
开发者ID:Nadia78,项目名称:easyhr,代码行数:14,代码来源:UsersTable.php

示例15: buildRules

 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->existsIn(['weeklyreport_id'], 'Weeklyreports'));
     $rules->add($rules->existsIn(['member_id'], 'Members'));
     $rules->add($rules->isUnique(['member_id', 'weeklyreport_id']));
     return $rules;
 }
开发者ID:Jukkaaf,项目名称:Metrics-Project,代码行数:7,代码来源:WeeklyhoursTable.php


注:本文中的Cake\ORM\RulesChecker::isUnique方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。