Move custom libs to the source tree
This commit is contained in:
15
libs/SimpleValidator/Validators/Numeric.php
Normal file
15
libs/SimpleValidator/Validators/Numeric.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace SimpleValidator\Validators;
|
||||
|
||||
class Numeric extends Base
|
||||
{
|
||||
public function execute(array $data)
|
||||
{
|
||||
if ($this->isFieldNotEmpty($data)) {
|
||||
return is_numeric($data[$this->field]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user