Регистр файлов
This commit is contained in:
parent
4fd0187ea6
commit
c8958cbee0
83 changed files with 25 additions and 53 deletions
17
src/Validator/Rule/Numeric.php
Normal file
17
src/Validator/Rule/Numeric.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Проверка на число
|
||||
*/
|
||||
class Validator_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