import { BaseValidator } from "./base-validator.mjs"; //#region ../@warlock.js/seal/src/validators/primitive-validator.d.ts /** * Abstract base validator for primitive-typed fields (string, number, boolean). * * Provides value-membership rules that are meaningful for any single primitive value * but not for complex structures (object, array). * * Do NOT expose this on the `v` factory — it is an inheritance-only base class. * * Hierarchy: * BaseValidator * └── PrimitiveValidator ← enum, in, oneOf, allowsOnly, forbids, notIn * ├── StringValidator * ├── NumberValidator * │ └── FloatValidator * ├── BooleanValidator * └── ScalarValidator (extends PrimitiveValidator, adds asNumber/asString/accepted/declined) * * @example * class MyValidator extends PrimitiveValidator { * // inherits: in(), forbids(), enum(), oneOf(), allowsOnly(), notIn() * } */ declare abstract class PrimitiveValidator extends BaseValidator { /** * Value must be one of the enum's values * * @example * v.string().enum(Direction) // Direction is a TS enum */ enum(values: any, errorMessage?: string): this; /** * Value must be one of the given values * * @example * v.string().in(["admin", "user", "guest"]) * v.number().in([1, 2, 3]) */ in(values: any[], errorMessage?: string): this; /** * Alias for `in()` * * @example * v.string().oneOf(["active", "inactive"]) */ oneOf(values: any[], errorMessage?: string): this; /** * Value must be one of the allowed values (stricter variant) * * @example * v.string().allowsOnly(["yes", "no"]) */ allowsOnly(values: any[], errorMessage?: string): this; /** * Value must NOT be one of the given values * * @example * v.string().forbids(["banned", "blacklisted"]) * v.number().forbids([0, -1]) */ forbids(values: any[], errorMessage?: string): this; /** * Alias for `forbids()` * * @example * v.string().notIn(["OK", "NOT OK"]) */ notIn(values: any[], errorMessage?: string): this; } //#endregion export { PrimitiveValidator }; //# sourceMappingURL=primitive-validator.d.mts.map