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