Files
kiri-validator/RoundValidator.php
2023-12-19 14:51:13 +08:00

27 lines
381 B
PHP

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