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

29 lines
414 B
PHP

<?php
namespace validator;
use Exception;
/**
* Class RoundValidator
* @package validator
*/
class RoundValidator extends BaseValidator
{
/**
* @param string $field
* @param mixed $value
* @return bool
* @throws
*/
public function trigger(string $field, mixed $value): bool
{
return round($value, $this->value) == $value;
}
}