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


PHP Validator::dateTime方法代码示例

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


在下文中一共展示了Validator::dateTime方法的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->requirePresence('title', 'create')->notEmpty('title');
     $validator->requirePresence('content', 'create')->notEmpty('content');
     $validator->dateTime('begin')->requirePresence('begin', 'create')->notEmpty('begin');
     $validator->dateTime('end')->requirePresence('end', 'create')->notEmpty('end');
     return $validator;
 }
开发者ID:LPFP,项目名称:donjon,代码行数:15,代码来源:EventsTable.php

示例2: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->allowEmpty('id', 'create');
     $validator->requirePresence('fkProductSubTypeID', 'create')->notEmpty('fkProductSubTypeID');
     $validator->requirePresence('name', 'create')->notEmpty('name');
     $validator->requirePresence('description', 'create')->notEmpty('description');
     $validator->requirePresence('Manufacturer', 'create')->notEmpty('Manufacturer');
     $validator->decimal('price')->requirePresence('price', 'create')->notEmpty('price');
     $validator->requirePresence('stock', 'create')->notEmpty('stock');
     $validator->integer('status')->requirePresence('status', 'create')->notEmpty('status');
     $validator->dateTime('date_added')->requirePresence('date_added', 'create')->notEmpty('date_added');
     $validator->dateTime('date_modified')->requirePresence('date_modified', 'create')->notEmpty('date_modified');
     return $validator;
 }
开发者ID:Multicoin-co,项目名称:PHP-WebStore,代码行数:20,代码来源:ProductTable.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->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

示例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('ip', 'create')->notEmpty('ip');
     $validator->requirePresence('session_id', 'create')->notEmpty('session_id');
     $validator->allowEmpty('result');
     $validator->dateTime('used')->allowEmpty('used');
     return $validator;
 }
开发者ID:dereuromark,项目名称:cakephp-captcha,代码行数:15,代码来源:CaptchasTable.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->integer('plan_periodo')->allowEmpty('plan_periodo');
     $validator->integer('plan_tipo')->allowEmpty('plan_tipo');
     $validator->integer('status')->allowEmpty('status');
     $validator->dateTime('vencimento')->allowEmpty('vencimento');
     return $validator;
 }
开发者ID:richellyitalo,项目名称:estudoscakephp,代码行数:15,代码来源:AnunciosTable.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('jobtype', 'create')->notEmpty('jobtype');
     $validator->allowEmpty('sendto');
     $validator->integer('show_id')->notEmpty('show_id');
     $validator->dateTime('start_time')->requirePresence('start_time', 'create')->notEmpty('start_time');
     $validator->integer('period')->requirePresence('period', 'create')->notEmpty('period');
     return $validator;
 }
开发者ID:jtsage,项目名称:TDTracX,代码行数:16,代码来源:SchedulesTable.php

示例7: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->integer('tID')->allowEmpty('tID', 'create');
     $validator->dateTime('exec_time')->requirePresence('exec_time', 'create')->notEmpty('exec_time');
     $validator->integer('status')->allowEmpty('status');
     $validator->allowEmpty('config_file');
     $validator->allowEmpty('comment');
     $validator->allowEmpty('error');
     return $validator;
 }
开发者ID:denvolj,项目名称:caked,代码行数:16,代码来源:TasksTable.php

示例8: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->allowEmpty('id', 'create');
     $validator->requirePresence('name', 'create')->notEmpty('name');
     $validator->requirePresence('content_title', 'create')->notEmpty('content_title');
     $validator->allowEmpty('content_description');
     $validator->allowEmpty('content_excerpt');
     $validator->dateTime('content_expiry')->allowEmpty('content_expiry');
     $validator->allowEmpty('content_password');
     $validator->allowEmpty('content_path');
     $validator->allowEmpty('content_mime_type');
     $validator->dateTime('publish_start')->requirePresence('publish_start', 'create')->notEmpty('publish_start');
     $validator->dateTime('publish_end')->requirePresence('publish_end', 'create')->notEmpty('publish_end');
     $validator->allowEmpty('guid');
     $validator->integer('menu_order')->allowEmpty('menu_order');
     $validator->integer('created_by')->allowEmpty('created_by');
     $validator->integer('modified_by')->allowEmpty('modified_by');
     return $validator;
 }
开发者ID:aoliverio,项目名称:content,代码行数:25,代码来源:CmsContentsTable.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('home_team', 'create')->notEmpty('home_team');
     $validator->requirePresence('away_team', 'create')->notEmpty('away_team');
     $validator->integer('home_number')->requirePresence('home_number', 'create')->notEmpty('home_number');
     $validator->integer('away_number')->requirePresence('away_number', 'create')->notEmpty('away_number');
     $validator->dateTime('match_time')->requirePresence('match_time', 'create')->notEmpty('match_time');
     $validator->integer('active')->requirePresence('active', 'create')->notEmpty('active');
     return $validator;
 }
开发者ID:ngocdo1987,项目名称:cakephp,代码行数:17,代码来源:MatchesTable.php

示例10: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->allowEmpty('id', 'create')->add('id', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
     $validator->requirePresence('uuid', 'create')->notEmpty('uuid');
     $validator->numeric('value')->requirePresence('value', 'create')->notEmpty('value');
     $validator->allowEmpty('weapon');
     $validator->allowEmpty('world');
     $validator->allowEmpty('victim');
     $validator->dateTime('time')->requirePresence('time', 'create')->notEmpty('time');
     return $validator;
 }
开发者ID:MoosemanStudios,项目名称:api.moosecraft.us,代码行数:17,代码来源:StatsPvpTable.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->requirePresence('descricao', 'create')->notEmpty('descricao');
     $validator->allowEmpty('observacoes', 'create');
     $validator->requirePresence('geradoPor', 'create')->notEmpty('geradoPor');
     $validator->allowEmpty('statusAlerta');
     $validator->requirePresence('tomboEquipamento', 'create')->notEmpty('tomboEquipamento');
     $validator->dateTime('dataAlerta')->requirePresence('dataAlerta', 'create')->notEmpty('dataAlerta');
     return $validator;
 }
开发者ID:daniels85,项目名称:SGL,代码行数:17,代码来源:AlertasTable.php

示例12: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->uuid('id')->allowEmpty('id', 'create');
     $validator->requirePresence('title', 'create')->notEmpty('title');
     $validator->requirePresence('excerpt', 'create')->notEmpty('excerpt')->add('excerpt', ['maxLength' => ['rule' => ['maxLength', 250], 'message' => 'Excerpts cannot be too long.']]);
     $validator->allowEmpty('text');
     $validator->boolean('sfw')->requirePresence('sfw', 'create')->notEmpty('sfw');
     $validator->integer('status')->requirePresence('status', 'create')->notEmpty('status');
     $validator->dateTime('publication_date')->allowEmpty('publication_date');
     return $validator;
 }
开发者ID:el-cms,项目名称:elabs,代码行数:17,代码来源:PostsTable.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->allowEmpty('tombo')->add('tombo', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
     $validator->allowEmpty('status');
     $validator->allowEmpty('codLocal');
     $validator->allowEmpty('fornecedor');
     $validator->allowEmpty('modelo');
     $validator->requirePresence('responsavel', 'create')->notEmpty('responsavel');
     $validator->integer('tipo')->requirePresence('tipo', 'create')->notEmpty('tipo');
     $validator->dateTime('dataDeCompra')->requirePresence('dataDeCompra', 'create')->notEmpty('dataDeCompra');
     return $validator;
 }
开发者ID:daniels85,项目名称:SGL,代码行数:20,代码来源:EquipamentosTable.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->dateTime('version')->requirePresence('version', 'create')->notEmpty('version');
     return $validator;
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:12,代码来源:testBakeAssociationDetectionProductVersionsTable.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->dateTime('time')->allowEmpty('time');
     return $validator;
 }
开发者ID:Moggers,项目名称:blitzserver,代码行数:12,代码来源:TurnsTable.php


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