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


PHP Validator::date方法代码示例

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


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

示例1: 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->date('dateemprunt')->requirePresence('dateemprunt', 'create')->notEmpty('dateemprunt');
     $validator->date('dateretour')->allowEmpty('dateretour');
     return $validator;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:13,代码来源:EmpruntsTable.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->integer('numero_nota_fiscal')->allowEmpty('numero_nota_fiscal');
     $validator->allowEmpty('serie');
     $validator->date('data_emissao')->allowEmpty('data_emissao');
     $validator->date('data_saida')->allowEmpty('data_saida');
     $validator->allowEmpty('hora_saida');
     $validator->numeric('total_produtos')->allowEmpty('total_produtos');
     $validator->numeric('total_nota')->allowEmpty('total_nota');
     $validator->numeric('base_icms')->allowEmpty('base_icms');
     $validator->numeric('valor_icms')->allowEmpty('valor_icms');
     $validator->integer('cancelada')->allowEmpty('cancelada');
     $validator->date('data_cancelada')->allowEmpty('data_cancelada');
     $validator->integer('numero_pedido')->allowEmpty('numero_pedido');
     $validator->integer('frete')->allowEmpty('frete');
     $validator->integer('qtde_volumes')->allowEmpty('qtde_volumes');
     $validator->allowEmpty('especie');
     $validator->numeric('base_st')->allowEmpty('base_st');
     $validator->numeric('valor_st')->allowEmpty('valor_st');
     $validator->numeric('base_credito')->allowEmpty('base_credito');
     $validator->numeric('valor_credito')->allowEmpty('valor_credito');
     $validator->numeric('percentual_tributo')->allowEmpty('percentual_tributo');
     $validator->numeric('valor_tributo')->allowEmpty('valor_tributo');
     $validator->integer('operacao')->allowEmpty('operacao');
     $validator->integer('atendimento')->allowEmpty('atendimento');
     $validator->allowEmpty('data_hora');
     return $validator;
 }
开发者ID:lucasnpinheiro,项目名称:Kiterp,代码行数:35,代码来源:NotasFiscaisSaidasTable.php

示例3: 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('number')->requirePresence('number', 'create')->notEmpty('number')->add('number', 'validFormat', ['rule' => array('custom', '/^[1-4]$/'), 'message' => 'Solo números entre 1 y 4']);
     $validator->date('date')->requirePresence('date', 'create')->notEmpty('date');
     $validator->date('deadline')->requirePresence('deadline', 'create')->notEmpty('deadline');
     return $validator;
 }
开发者ID:raguilar0,项目名称:TCU_FEUCR,代码行数:14,代码来源:TractsTable.php

示例4: 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('experience', 'create')->notEmpty('experience');
     $validator->date('date_debut')->requirePresence('date_debut', 'create')->notEmpty('date_debut');
     $validator->date('date_fin')->requirePresence('date_fin', 'create')->notEmpty('date_fin');
     $validator->requirePresence('description', 'create')->notEmpty('description');
     return $validator;
 }
开发者ID:ArthurLnq,项目名称:CRUD_CakePHP,代码行数:15,代码来源:ExperiencesTable.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('eventname', 'create')->notEmpty('eventname');
     $validator->requirePresence('description', 'create')->notEmpty('description');
     $validator->requirePresence('description', 'create')->notEmpty('description');
     $validator->requirePresence('location', 'create')->notEmpty('location');
     $validator->date('startdate')->requirePresence('startdate', 'create')->notEmpty('startdate');
     $validator->date('enddate')->requirePresence('enddate', 'create')->notEmpty('enddate');
     return $validator;
 }
开发者ID:SanderEveraers,项目名称:pokemonleague,代码行数:17,代码来源:EventsTable.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->requirePresence('name', 'create')->notEmpty('name');
     $validator->date('date')->requirePresence('date', 'create')->notEmpty('date');
     $validator->numeric('amount')->requirePresence('amount', 'create')->notEmpty('amount');
     $validator->integer('lft')->allowEmpty('lft');
     $validator->integer('rght')->allowEmpty('rght');
     $validator->date('end')->allowEmpty('end');
     $validator->integer('recur_every')->allowEmpty('recur_every');
     return $validator;
 }
开发者ID:randompherret,项目名称:paperbudget,代码行数:18,代码来源:TransactionsTable.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->requirePresence('name', 'create')->notEmpty('name');
     $validator->date('begin')->requirePresence('begin', 'create')->notEmpty('begin');
     $validator->date('end')->requirePresence('end', 'create')->notEmpty('end');
     $validator->requirePresence('notes', 'create')->notEmpty('notes');
     $validator->numeric('total')->requirePresence('total', 'create')->notEmpty('total');
     $validator->numeric('paid')->requirePresence('paid', 'create')->notEmpty('paid');
     $validator->numeric('rest')->requirePresence('rest', 'create')->notEmpty('rest');
     $validator->requirePresence('invoice', 'create')->notEmpty('invoice');
     return $validator;
 }
开发者ID:AdBouli,项目名称:hotel-manager,代码行数:19,代码来源:ReservationsTable.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('nom', 'create')->notEmpty('nom');
     $validator->requirePresence('prenom', 'create')->notEmpty('prenom');
     $validator->allowEmpty('pseudo');
     $validator->date('naissance')->requirePresence('naissance', 'create')->notEmpty('naissance');
     $validator->date('deces')->allowEmpty('deces');
     $validator->requirePresence('nationalite', 'create')->notEmpty('nationalite');
     $validator->requirePresence('biographie', 'create')->notEmpty('biographie');
     $validator->allowEmpty('photo');
     return $validator;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:19,代码来源:AuteursTable.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('promo_code', 'create')->notEmpty('promo_code');
     $validator->requirePresence('discounted_amount_parent', 'create')->notEmpty('discounted_amount_parent');
     $validator->integer('quantity_parent')->requirePresence('quantity_parent', 'create')->notEmpty('quantity_parent');
     $validator->date('start_date')->requirePresence('start_date', 'create')->notEmpty('start_date');
     $validator->date('end_date')->requirePresence('end_date', 'create')->notEmpty('end_date');
     $validator->requirePresence('associated_product', 'create')->notEmpty('associated_product');
     $validator->requirePresence('discounted_amount_child', 'create')->notEmpty('discounted_amount_child');
     $validator->integer('quantity_child')->requirePresence('quantity_child', 'create')->notEmpty('quantity_child');
     $validator->requirePresence('discount_parent_in', 'create')->notEmpty('discount_parent_in');
     $validator->requirePresence('discount_child_in', 'create')->notEmpty('discount_child_in');
     return $validator;
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:21,代码来源:PromotionsTable.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->date('date')->allowEmpty('date');
     $validator->numeric('budget')->allowEmpty('budget');
     return $validator;
 }
开发者ID:randompherret,项目名称:paperbudget,代码行数:13,代码来源:MonthliesTable.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->date('datepreuve')->requirePresence('datepreuve', 'create')->notEmpty('datepreuve');
     $validator->requirePresence('lieu', 'create')->notEmpty('lieu');
     return $validator;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:13,代码来源:TestsTable.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('question', 'create')->notEmpty('question');
     $validator->date('date')->allowEmpty('date');
     $validator->allowEmpty('etat_objet');
     return $validator;
 }
开发者ID:didisky,项目名称:projectsurvey,代码行数:14,代码来源:QuestionsTable.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('categorie', 'create')->notEmpty('categorie');
     $validator->date('datedeparution')->requirePresence('datedeparution', 'create')->notEmpty('datedeparution');
     $validator->numeric('prix')->requirePresence('prix', 'create')->notEmpty('prix');
     $validator->integer('user_id')->requirePresence('user_id', true)->notEmpty('user_id');
     return $validator;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:15,代码来源:AnnoncesTable.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->integer('numero_nota_fiscal')->allowEmpty('numero_nota_fiscal');
     $validator->allowEmpty('serie');
     $validator->date('data_emissao')->allowEmpty('data_emissao');
     $validator->date('data_entrada')->allowEmpty('data_entrada');
     $validator->numeric('total_produtos')->allowEmpty('total_produtos');
     $validator->numeric('total_nota')->allowEmpty('total_nota');
     $validator->numeric('base_icms')->allowEmpty('base_icms');
     $validator->numeric('valor_icms')->allowEmpty('valor_icms');
     $validator->numeric('base_st')->allowEmpty('base_st');
     $validator->numeric('valor_st')->allowEmpty('valor_st');
     $validator->numeric('valor_ipi')->allowEmpty('valor_ipi');
     $validator->numeric('valor_frete')->allowEmpty('valor_frete');
     $validator->numeric('valor_seguro')->allowEmpty('valor_seguro');
     return $validator;
 }
开发者ID:lucasnpinheiro,项目名称:Kiterp,代码行数:24,代码来源:NotasFiscaisEntradasTable.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('nombres', 'create')->notEmpty('nombres');
     $validator->requirePresence('apellido_paterno', 'create')->notEmpty('apellido_paterno');
     $validator->requirePresence('apellido_materno', 'create')->notEmpty('apellido_materno');
     $validator->date('fecha_nac')->allowEmpty('fecha_nac');
     $validator->requirePresence('estado', 'create')->notEmpty('estado');
     return $validator;
 }
开发者ID:Rabp9,项目名称:help-desk,代码行数:16,代码来源:PersonasTable.php


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