Skip to content

Commit 6911662

Browse files
fix(format): use RFC1123 hostname validator for legacy drafts (#109)
* fix(format): use RFC1123 hostname validator for legacy drafts Signed-off-by: Vaibhav mittal <vaibhavmittal929@gmail.com> * test: remove regression test per maintainer request Signed-off-by: Vaibhav mittal <vaibhavmittal929@gmail.com> --------- Signed-off-by: Vaibhav mittal <vaibhavmittal929@gmail.com>
1 parent e7a49da commit 6911662

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { isAsciiIdn } from "@hyperjump/json-schema-formats";
1+
import { isHostname } from "@hyperjump/json-schema-formats";
22

33

44
export default {
55
id: "https://json-schema.org/format/draft-04/hostname",
6-
handler: (hostname) => typeof hostname !== "string" || isAsciiIdn(hostname)
6+
handler: (hostname) => typeof hostname !== "string" || isHostname(hostname)
77
};

0 commit comments

Comments
 (0)