- Some minor on request debugger

This commit is contained in:
Dave Mc Nicoll committed 2026-01-12 21:18:10 +00:00
1 parent c3e3d6a73a
commit ba74c5a38e
17 files changed
+255 -202

No files matched your search

+2 -5
View File
@@ -17,8 +17,8 @@ class ContextField
public ?int $maxLength = null,
public ?string $regexFormat = null,
public ?string $example = null,
public bool $hidden = false,
public mixed $default = null,
public bool $hidden = false,
) {}
public function assertValueSpecs(mixed $value, bool $isNew) : void
@@ -39,10 +39,7 @@ class ContextField
}
if ($this->regexFormat) {
if (! is_string($value)) {
throw new RegexFormatException("Property type must be a string if a regexFormat is provided.");
}
elseif (! preg_match($this->regexFormat, $value)) {
if (! preg_match($this->regexFormat, $value)) {
throw new RegexFormatException("Regex format {$this->regexFormat} is not valid for value {$value}.");
}
}