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


PHP Validator::email方法代码示例

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


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

示例1: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->numeric('id')->allowEmpty('id', 'create');
     $validator->requirePresence('name', 'create')->notEmpty('name');
     $validator->email('email')->allowEmpty('email')->add('email', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
     return $validator;
 }
开发者ID:ionas,项目名称:bake,代码行数:13,代码来源:testBakeTableValidation.php

示例2: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     $validator->requirePresence('password', 'create')->notEmpty('password');
     return $validator;
 }
开发者ID:nevermore2014,项目名称:bookmark,代码行数:13,代码来源:UsersTable.php

示例3: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     /*autorise de 4 à 14 caractères de type :  
      *(a-z) alphanumérique minuscule, 
      * (A-Z) alphanumérique majuscule,
      *(0-9) 0 à 9, (_-) l’underscore et le tiret.
      */
     $regexUsername = '/^[a-zA-Z0-9_-]{4,14}$/';
     /*autorise de 8 à 12 caractères de type :
      *(a-z) alphanumérique minuscule,
      *(A-Z) alphanumérique majuscule,
      *(0-9) chiffres de 0 à 9,
      *(?@.;:!_-) les caractères ? @ . ; : ! _ et - 
      */
     $regexPassword = ' /^[a-zA-Z0-9?@\\.;:!_-]{8,12}$/';
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->requirePresence('username', 'create')->notEmpty('username')->add('username', 'validFormat', ['rule' => ['custom', $regexUsername], 'message' => 'Le nom d\'utilisateur autorise de 8 à 12 caractères de type :
                             (a-z) alphanumérique minuscule,
                             (A-Z) alphanumérique majuscule,
                             (0-9) chiffres de 0 à 9,
                             (?@.;:!_-) les caractères ? @ . ; : ! _ et - ']);
     $validator->requirePresence('password', 'create')->notEmpty('password')->add('password', 'validFormat', ['rule' => ['custom', $regexPassword], 'message' => 'Le mot de passe autorise de 8 à 12 caractères de type :
                 (a-z) alphanumérique minuscule,
                 (A-Z) alphanumérique majuscule,
                 (0-9) chiffres de 0 à 9,
                 (?@.;:!_-) les caractères ? @ . ; : ! _ et -  ']);
     $validator->requirePresence('first_name', 'create')->notEmpty('first_name');
     $validator->requirePresence('last_name', 'create')->notEmpty('last_name');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     return $validator;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:37,代码来源:UsersTable.php

示例4: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->numeric('id')->allowEmpty('id', 'create');
     $validator->allowEmpty('name');
     $validator->email('email')->allowEmpty('email');
     $validator->allowEmpty('password');
     return $validator;
 }
开发者ID:vorien,项目名称:supplyanddemand,代码行数:14,代码来源:UsersTable.php

示例5: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->requirePresence('username', 'create')->notEmpty('username', 'A username is required.')->add('username', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email')->add('email', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
     $validator->requirePresence('password', 'create')->notEmpty('password', 'A password is required.');
     $validator->notEmpty('role', 'A role is required.')->add('role', 'inList', ['rule' => ['inList', ['Admin', 'User']], 'message' => 'Please enter a valid role.']);
     return $validator;
 }
开发者ID:Custodia,项目名称:caketickets,代码行数:15,代码来源:UsersTable.php

示例6: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->allowEmpty('first_name');
     $validator->allowEmpty('last_name');
     $validator->email('email')->allowEmpty('email');
     $validator->allowEmpty('picture');
     $validator->integer('max_score')->allowEmpty('max_score');
     return $validator;
 }
开发者ID:albertoneto,项目名称:localhost,代码行数:16,代码来源:UsersTable.php

示例7: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->allowEmpty('name');
     $validator->email('email')->allowEmpty('email');
     $validator->requirePresence('url', 'create')->notEmpty('url');
     $validator->requirePresence('reason', 'create')->notEmpty('reason');
     $validator->allowEmpty('session');
     return $validator;
 }
开发者ID:el-cms,项目名称:elabs,代码行数:16,代码来源:ReportsTable.php

示例8: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->requirePresence('lastName', 'create')->notEmpty('lastName');
     $validator->requirePresence('firstName', 'create')->notEmpty('firstName');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     $validator->requirePresence('phone', 'create')->notEmpty('phone');
     $validator->requirePresence('address', 'create')->notEmpty('address');
     return $validator;
 }
开发者ID:AdBouli,项目名称:hotel-manager,代码行数:16,代码来源:AccountsTable.php

示例9: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->requirePresence('model', 'create')->notEmpty('model');
     $validator->uuid('fkid')->requirePresence('fkid', 'create')->notEmpty('fkid');
     $validator->requirePresence('name', 'create')->notEmpty('name');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     $validator->boolean('allow_contact')->requirePresence('allow_contact', 'create')->notEmpty('allow_contact');
     $validator->requirePresence('message', 'create')->notEmpty('message');
     return $validator;
 }
开发者ID:el-cms,项目名称:elabs,代码行数:17,代码来源:CommentsTable.php

示例10: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->requirePresence('password', 'create')->notEmpty('password');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     $validator->requirePresence('role', 'create')->notEmpty('role');
     $validator->requirePresence('nom', 'create')->notEmpty('nom');
     $validator->requirePresence('prenom', 'create')->notEmpty('prenom');
     $validator->requirePresence('adresse', 'create')->notEmpty('adresse');
     $validator->integer('codepostal')->requirePresence('codepostal', 'create')->notEmpty('codepostal');
     $validator->requirePresence('ville', 'create')->notEmpty('ville');
     return $validator;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:19,代码来源:UsersTable.php

示例11: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->integer('role')->requirePresence('role', 'create')->notEmpty('role');
     $validator->integer('name')->requirePresence('name', 'create')->notEmpty('name');
     $validator->integer('firstname')->requirePresence('firstname', 'create')->notEmpty('firstname');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     $validator->requirePresence('password', 'create')->notEmpty('password');
     $validator->requirePresence('poste', 'create')->notEmpty('poste');
     $validator->requirePresence('numberSS', 'create')->notEmpty('numberSS');
     $validator->requirePresence('numberFisc', 'create')->notEmpty('numberFisc');
     return $validator;
 }
开发者ID:Nadia78,项目名称:easyhr,代码行数:19,代码来源:UsersTable.php

示例12: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->requirePresence('nombre', 'create')->notEmpty('nombre');
     $validator->requirePresence('apellido', 'create')->notEmpty('apellido');
     $validator->requirePresence('password', 'create')->notEmpty('password');
     $validator->date('fecha_nacimiento')->requirePresence('fecha_nacimiento', 'create')->notEmpty('fecha_nacimiento');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     $validator->requirePresence('telefono', 'create')->notEmpty('telefono');
     $validator->integer('num_natricula')->requirePresence('num_natricula', 'create')->notEmpty('num_natricula');
     $validator->decimal('nota_selectividad')->requirePresence('nota_selectividad', 'create')->notEmpty('nota_selectividad');
     return $validator;
 }
开发者ID:srubengt,项目名称:cakephp,代码行数:19,代码来源:AlumnosTable.php

示例13: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->requirePresence('nome', 'create')->notEmpty('nome');
     $validator->requirePresence('username', 'create')->notEmpty('username')->add('username', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
     $validator->requirePresence('password', 'create')->notEmpty('password');
     $validator->requirePresence('matricula', 'create')->notEmpty('matricula')->add('matricula', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email')->add('email', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
     $validator->requirePresence('role', 'create')->notEmpty('role');
     $validator->allowEmpty('cadastradoPor');
     $validator->dateTime('dataDeCadastro');
     $validator->dateTime('ultimaVezAtivo');
     return $validator;
 }
开发者ID:daniels85,项目名称:SGL,代码行数:20,代码来源:UsersTable.php

示例14: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     $validator->requirePresence('password', 'create')->notEmpty('password');
     $validator->allowEmpty('image');
     $validator->allowEmpty('group_id');
     $validator->allowEmpty('image_dir');
     $validator->requirePresence('dob', 'create')->notEmpty('dob');
     $validator->requirePresence('mobile', 'create')->notEmpty('mobile');
     $validator->requirePresence('firstname', 'create')->notEmpty('firstname');
     $validator->requirePresence('lastname', 'create')->notEmpty('lastname');
     return $validator;
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:20,代码来源:AdminsTable.php

示例15: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('id')->allowEmpty('id', 'create');
     $validator->requirePresence('firstname', 'create')->notEmpty('firstname');
     $validator->requirePresence('lastname', 'create')->notEmpty('lastname');
     $validator->email('email')->requirePresence('email', 'create')->notEmpty('email');
     $validator->requirePresence('street_address', 'create')->notEmpty('street_address');
     $validator->requirePresence('city', 'create')->notEmpty('city');
     $validator->requirePresence('country', 'create')->notEmpty('country');
     $validator->requirePresence('pincode', 'create')->notEmpty('pincode');
     $validator->requirePresence('phone', 'create')->notEmpty('phone');
     $validator->requirePresence('mobile', 'create')->notEmpty('mobile');
     return $validator;
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:20,代码来源:OrderShippingsTable.php


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