當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。