Ejemplo n.º 1
1
 /**
  * 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;
 }
Ejemplo n.º 2
1
 /**
  * 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(['generation_id'], 'Generations'));
     $rules->add($rules->existsIn(['career_id'], 'Careers'));
     return $rules;
 }
Ejemplo n.º 3
1
 /**
  * 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;
 }
Ejemplo n.º 4
0
 /**
  * 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;
 }
Ejemplo n.º 5
0
 /**
  * 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;
 }
Ejemplo n.º 6
0
 /**
  * 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;
 }
Ejemplo n.º 7
0
 /**
  * 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(['login']));
     $rules->add($rules->existsIn(['departamento_id'], 'Departamentos'));
     return $rules;
 }
Ejemplo n.º 8
0
 /**
  * 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;
 }
Ejemplo n.º 9
0
 /**
  * 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;
 }
Ejemplo n.º 10
0
 /**
  * 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;
 }
Ejemplo n.º 11
0
 /**
  * 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;
 }
 /**
  * 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(['group_id'], 'Groups'));
     //$rules->add($rules->existsIn(['region_id'], 'Regions'));
     return $rules;
 }
Ejemplo n.º 13
0
 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;
 }
Ejemplo n.º 14
0
 /**
  * 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;
 }
Ejemplo n.º 15
0
 /**
  * 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;
 }
Ejemplo n.º 16
0
 /**
  * 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;
 }
Ejemplo n.º 17
0
 /**
  * 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;
 }
Ejemplo n.º 18
0
 /**
  * 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->existsIn(['section_id'], 'Sections'));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     return $rules;
 }
Ejemplo n.º 19
0
 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;
 }
Ejemplo n.º 20
0
 /**
  * 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(['customer_id'], 'Customers'));
     $rules->add($rules->existsIn(['employee_id'], 'Employees'));
     return $rules;
 }
Ejemplo n.º 21
0
 /**
  * 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(['user_id'], 'Users'));
     $rules->add($rules->existsIn(['social_network_id'], 'SocialNetworks'));
     return $rules;
 }
Ejemplo n.º 22
0
 public function buildRules(RulesChecker $rules)
 {
     $rules->add($rules->isUnique(['email']));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     $rules->add($rules->existsIn(['client_info_id'], 'ClientInfos'));
     return $rules;
 }
Ejemplo n.º 23
0
 /**
  * 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->existsIn(['rubric_id'], 'Rubrics'));
     $rules->add($rules->existsIn(['blog_id'], 'Blogs'));
     return $rules;
 }
Ejemplo n.º 24
0
 /**
  * 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(['estado_id'], 'Estado'));
     $rules->add($rules->existsIn(['anegocio_id'], 'Anegocio'));
     return $rules;
 }
 /**
  * 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->existsIn(['education_id'], 'Educations'));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     return $rules;
 }
Ejemplo n.º 26
0
 /**
  * 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(['champion']));
     $rules->add($rules->existsIn(['district_id'], 'Districts'));
     $rules->add($rules->existsIn(['user_id'], 'Users'));
     return $rules;
 }
Ejemplo n.º 27
0
 /**
  * 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->existsIn(['country_id'], 'Countries'));
     $rules->add($rules->existsIn(['site_id'], 'Sites'));
     return $rules;
 }
Ejemplo n.º 28
0
 /**
  * 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(['dia_id'], 'Dias'));
     $rules->add($rules->existsIn(['hora_id'], 'Horas'));
     return $rules;
 }
Ejemplo n.º 29
0
 /**
  * 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(['user_id'], 'Users'));
     $rules->add($rules->existsIn(['country_id'], 'Countries'));
     return $rules;
 }
Ejemplo n.º 30
0
 /**
  * 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(['state_id'], 'States'));
     $rules->add($rules->existsIn(['city_id'], 'Cities'));
     return $rules;
 }