Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ describe("change short name validation rules", () => {
expect(success).toBeFalsy();
});

test("cannot exceed 16 characters", () => {
test("cannot exceed 50 characters", () => {
const validation = shortNameValidationSchema("", []);

const { success } = validation.safeParse("a".repeat(17));
const { success } = validation.safeParse("a".repeat(51));

expect(success).toBeFalsy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const shortNameValidationSchema = (currentShortName: string | undefined,
zod
.string()
.min(1)
.max(16)
.max(50)
.superRefine((arg: string, ctx: RefinementCtx) => {
isUniqueIn<Domain>(arg, ctx, {
in: domains.filter((d) => d.shortName !== currentShortName),
Expand Down Expand Up @@ -41,7 +41,7 @@ export const boundedContextShortNameValidationSchema = (boundedContexts: Bounded
zod
.string()
.min(1)
.max(16)
.max(50)
.refine((term: string) => !startsWithNumber(term), {
message: "Must not start with a number",
})
Expand Down
Loading