本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}