Files
kiri-validator/IntegerValidator.php
T
2023-12-18 15:01:09 +08:00

31 lines
467 B
PHP

<?php
/**
* Created by PhpStorm.
* User: whwyy
* Date: 2018/4/4 0004
* Time: 18:44
*/
declare(strict_types=1);
namespace validator;
use Database\ModelInterface;
/**
*
*/
class IntegerValidator extends BaseValidator
{
/**
* @param string $field
* @param float $value
* @return bool
*/
public function trigger(string $field, mixed $value): bool
{
return (float)$value == $value;
}
}