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


PHP Validator::numeric方法代码示例

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


在下文中一共展示了Validator::numeric方法的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->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

示例2: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->numeric('id')->allowEmpty('id', 'create');
     $validator->numeric('quantity')->allowEmpty('quantity');
     $validator->numeric('value')->allowEmpty('value');
     return $validator;
 }
开发者ID:vorien,项目名称:supplyanddemand,代码行数:13,代码来源:LocationInventoriesTable.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')->requirePresence('tract_id', 'create');
     $validator->numeric('little_amount')->requirePresence('little_amount', 'create')->notEmpty('little_amount')->add('little_amount', 'validFormat', ['rule' => array('custom', '/^[0-9\\,\\.]+$/'), 'message' => 'Formato inválido. Solo números.']);
     $validator->numeric('big_amount')->requirePresence('big_amount', 'create')->notEmpty('big_amount')->add('big_amount', 'validFormat', ['rule' => array('custom', '/^[0-9\\,\\.]+$/'), 'message' => 'Formato inválido. Solo números.']);
     $validator->integer('type')->requirePresence('type', 'create')->notEmpty('type');
     return $validator;
 }
开发者ID:raguilar0,项目名称:TCU_FEUCR,代码行数:14,代码来源:BoxesTable.php

示例4: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->numeric('id')->allowEmpty('id', 'create');
     $validator->allowEmpty('name');
     $validator->allowEmpty('icon');
     $validator->numeric('icon_display_size')->allowEmpty('icon_display_size');
     return $validator;
 }
开发者ID:vorien,项目名称:supplyanddemand,代码行数:14,代码来源:ItemsTable.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->numeric('qtde')->allowEmpty('qtde');
     $validator->numeric('compra')->allowEmpty('compra');
     $validator->numeric('total')->allowEmpty('total');
     return $validator;
 }
开发者ID:lucasnpinheiro,项目名称:Kiterp,代码行数:14,代码来源:NotasFiscaisEntradasItensTable.php

示例6: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->numeric('id')->allowEmpty('id', 'create');
     $validator->numeric('step')->allowEmpty('step');
     $validator->numeric('distance')->allowEmpty('distance');
     $validator->numeric('delay')->allowEmpty('delay');
     return $validator;
 }
开发者ID:vorien,项目名称:supplyanddemand,代码行数:14,代码来源:StepsTable.php

示例7: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->numeric('id')->allowEmpty('id', 'create');
     $validator->allowEmpty('name');
     $validator->allowEmpty('item_supply_border_color');
     $validator->numeric('item_supply_border_thickness')->allowEmpty('item_supply_border_thickness');
     $validator->allowEmpty('item_demand_border_color');
     $validator->numeric('item_demand_border_thickness')->allowEmpty('item_demand_border_thickness');
     return $validator;
 }
开发者ID:vorien,项目名称:supplyanddemand,代码行数:16,代码来源:UserPreferencesTable.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->allowEmpty('nome');
     $validator->allowEmpty('unidade');
     $validator->allowEmpty('grupo');
     $validator->numeric('estoque')->allowEmpty('estoque');
     $validator->numeric('compra')->allowEmpty('compra');
     $validator->numeric('valor')->allowEmpty('valor');
     $validator->numeric('total')->allowEmpty('total');
     return $validator;
 }
开发者ID:lucasnpinheiro,项目名称:Kiterp,代码行数:18,代码来源:InventariosTable.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('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

示例10: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->numeric('id')->allowEmpty('id', 'create');
     $validator->allowEmpty('name');
     $validator->allowEmpty('background_color');
     return $validator;
 }
开发者ID:vorien,项目名称:supplyanddemand,代码行数:13,代码来源:GradesTable.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('date')->allowEmpty('date');
     $validator->numeric('budget')->allowEmpty('budget');
     return $validator;
 }
开发者ID:randompherret,项目名称:paperbudget,代码行数:13,代码来源:MonthliesTable.php

示例12: 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');
     return $validator;
 }
开发者ID:MoosemanStudios,项目名称:api.moosecraft.us,代码行数:13,代码来源:StatsJoinsTable.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('name', 'create')->notEmpty('name');
     $validator->numeric('rate')->requirePresence('rate', 'create')->notEmpty('rate');
     return $validator;
 }
开发者ID:AdBouli,项目名称:hotel-manager,代码行数:13,代码来源:ProductsTable.php

示例14: validationDefault

 /**
  * Default validation rules.
  *
  * @param \Cake\Validation\Validator $validator Validator instance.
  * @return \Cake\Validation\Validator
  */
 public function validationDefault(Validator $validator)
 {
     $validator->allowEmpty('language', 'create');
     $validator->boolean('is_official')->requirePresence('is_official', 'create')->notEmpty('is_official');
     $validator->numeric('percentage')->requirePresence('percentage', 'create')->notEmpty('percentage');
     return $validator;
 }
开发者ID:AFPA-Dijon,项目名称:afpa,代码行数:13,代码来源:LanguagesTable.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->numeric('amount')->requirePresence('amount', 'create')->notEmpty('amount')->add('amount', 'validFormat', ['rule' => array('custom', '/^[0-9\\,\\.]+$/'), 'message' => 'Formato inválido.']);
     $validator->requirePresence('detail', 'create')->notEmpty('detail')->add('detail', 'validFormat', ['rule' => array('custom', '/^[A-Za-z0-9" "\\,\\.\\-\\:áéíóúÁÉÍÓÚñÑ\\[\\]\\(\\)\\"]+$/'), 'message' => 'Formato inválido.']);
     return $validator;
 }
开发者ID:raguilar0,项目名称:TCU_FEUCR,代码行数:13,代码来源:SurplusesTable.php


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