alexpts/simple-validator

View on GitHub
src/PTS/Validator/Validators/AlphaValidator.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
declare(strict_types=1);

namespace PTS\Validator\Validators;

class AlphaValidator
{
    public function __invoke($value): bool
    {
        return is_string($value) && preg_match('/^[\pL\pM]+$/u', $value);
    }
}