Skip to content

Commit df44df1

Browse files
authored
fix: allow UUID version 1-8 as filter values (#1486)
* fix: Update UUID pattern to allow version 1-8 * test: regression test for UUIDv7 filter values
1 parent 81354ff commit df44df1

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

ui/hooks/filter-utils.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ describe("filter syntax validation", () => {
181181
["role", "=", "admin"],
182182
["role", "ilike", "%adm%"],
183183
["id", "=", "4f9d4af6-3ce2-4f3d-b4e6-cf8d0f510d4a"],
184+
["id", "=", "019d6991-4380-76ba-b4eb-35c36b72d7f2"],
184185
["attachment", "!=", "0xDEADBEEF"],
185186
["enabled", "=", "true"],
186187
["score", ">", "12.5"],

ui/hooks/filter-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ const TEXT_MATCH_OPERATORS = new Set<FilterOperator>([
216216
"not like",
217217
]);
218218
const UUID_PATTERN =
219-
/^[\da-f]{8}-[\da-f]{4}-[1-5][\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i;
219+
/^[\da-f]{8}-[\da-f]{4}-[1-8][\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i;
220220

221221
type ColumnSyntaxKind =
222222
| "array"

0 commit comments

Comments
 (0)