IP Address
Check if the value is an IP address
IPv4 / IPv6
Checks if the given string is an IP address regardless of version
import Schema from "@rapidom/schema";
const Validator = Schema.string().ip();
IPv4
Checks if the given string is an IPv4 address
import Schema from "@rapidom/schema";
const Validator = Schema.string().ip(4);
IPv6
Checks if the given string is an IPv6 address
import Schema from "@rapidom/schema";
const Validator = Schema.string().ip(6);
Last updated
Was this helpful?