Переделка для composer autoload
This commit is contained in:
parent
ad69746347
commit
b5641db607
100 changed files with 14 additions and 325 deletions
19
src/validator/rule/numeric.php
Normal file
19
src/validator/rule/numeric.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
require_once 'abstract.php';
|
||||
|
||||
/**
|
||||
* Проверка на число
|
||||
*/
|
||||
class Rule_Numeric extends Rule_Abstract
|
||||
{
|
||||
public function getErrorMsg()
|
||||
{
|
||||
return "Значение поля должно быть числом";
|
||||
}
|
||||
|
||||
public function isValid(Collection $container, $status = null)
|
||||
{
|
||||
return (is_numeric($container->get($this->field)));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue