Skip to content

Commit d3da530

Browse files
authored
reflect the specified regex correctly in error (#5338)
1 parent 5c2602c commit d3da530

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/zod/src/v4/core/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export const $ZodURL: core.$constructor<$ZodURL> = /*@__PURE__*/ core.$construct
489489
code: "invalid_format",
490490
format: "url",
491491
note: "Invalid hostname",
492-
pattern: regexes.hostname.source,
492+
pattern: def.hostname.source,
493493
input: payload.value,
494494
inst,
495495
continue: !def.abort,

0 commit comments

Comments
 (0)