for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Del\Form\Validator;
use function filter_var;
class IntegerValidator implements ValidatorInterface
{
public function isValid(mixed $value): bool
return (bool) filter_var($value, FILTER_VALIDATE_INT);
}
public function getMessages(): array
return ['Value is not an integer.'];