Skip to content

Commit 05c5ff8

Browse files
abnegateclaude
andcommitted
fix: skip format validation for non-primary VAR_ID attributes in Sequence
Non-primary VAR_ID attributes like $tenant can be any int/string value and should not be forced through UUID7 or Integer range checks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e135e51 commit 05c5ff8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Database/Validator/Sequence.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public function isValid($value): bool
4949
return false;
5050
}
5151

52+
if (!$this->primary) {
53+
return true;
54+
}
55+
5256
switch ($this->idAttributeType) {
5357
case Database::VAR_UUID7:
5458
return \is_string($value) && preg_match('/^[a-f0-9]{8}-[a-f0-9]{4}-7[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i', $value) === 1;

0 commit comments

Comments
 (0)