Enum

Checks if the given string is exactly one of the given values

import Schema from "@rapidom/schema";

const Validator = Schema.string().enum(["foo", "bar"]);

Last updated