Jyxo\Input\Validator\IsInt::isValid PHP Method

isValid() public method

Validates a value.
public isValid ( mixed $value ) : boolean
$value mixed Input value
return boolean
    public function isValid($value) : bool
    {
        if (is_array($value) || is_object($value)) {
            return false;
        }
        if (!preg_match('~^\\d+$~', (string) $value)) {
            return false;
        }
        return true;
    }
IsInt