From 9318e2b6ce47bbca5bc524cf8fd75e7ea0d7ee28 Mon Sep 17 00:00:00 2001 From: Konstantin Wohlwend Date: Fri, 5 Sep 2025 12:53:08 -0700 Subject: [PATCH] User-specified ID schema now supports UUIDs --- packages/stack-shared/src/schema-fields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stack-shared/src/schema-fields.ts b/packages/stack-shared/src/schema-fields.ts index 63bb5b08e..fca39f647 100644 --- a/packages/stack-shared/src/schema-fields.ts +++ b/packages/stack-shared/src/schema-fields.ts @@ -423,7 +423,7 @@ export const dayIntervalOrNeverSchema = yupUnion(dayIntervalSchema.defined(), yu * This schema is useful for fields where the user can specify the ID, such as price IDs. It is particularly common * for IDs in the config schema. */ -export const userSpecifiedIdSchema = (idName: `${string}Id`) => yupString().max(63).matches(/^[a-zA-Z_][a-zA-Z0-9_-]*$/, `${idName} must start with a letter or underscore and contain only letters, numbers, underscores, and hyphens`); +export const userSpecifiedIdSchema = (idName: `${string}Id`) => yupString().max(63).matches(/^[a-zA-Z_][a-zA-Z0-9_-]*$/, `${idName} must start with a letter, underscore, or number, and contain only letters, numbers, underscores, and hyphens`); export const moneyAmountSchema = (currency: Currency) => yupString().test('money-amount', 'Invalid money amount', (value, context) => { if (value == null) return true; const regex = /^([0-9]+)(\.([0-9]+))?$/;