Condition si var vide non obligatoire mais regex
This commit is contained in:
parent
e67eb62e57
commit
6853bf95ae
|
@ -15,7 +15,11 @@ class RegexColumnSpecification implements ColumnSpecificationInterface
|
||||||
|
|
||||||
public function isSatisfiedBy(string $value): bool
|
public function isSatisfiedBy(string $value): bool
|
||||||
{
|
{
|
||||||
return preg_match($this->pattern, $value) === 1;
|
if(!empty($value) || !trim($value) === '') {
|
||||||
|
return preg_match($this->pattern, $value) === 1;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getErrorMessage(): string
|
public function getErrorMessage(): string
|
||||||
|
|
Loading…
Reference in New Issue