Condition si var vide non obligatoire mais regex

This commit is contained in:
Dorian 2025-05-14 10:46:22 +02:00
parent e67eb62e57
commit 6853bf95ae
1 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,11 @@ class RegexColumnSpecification implements ColumnSpecificationInterface
public function isSatisfiedBy(string $value): bool
{
if(!empty($value) || !trim($value) === '') {
return preg_match($this->pattern, $value) === 1;
}else{
return true;
}
}
public function getErrorMessage(): string