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