for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SolBianca\Validator\Rules;
use SolBianca\Validator\Interfaces\RuleInterface;
class IntRule implements RuleInterface
{
/**
* {@inheritdoc}
*/
public function run($value, array $inputs, array $args): bool
return is_int($value);
}
public function errorMessage(): string
return 'Field `{field}` must be an integer.';
public function canSkip(): bool
return true;