and
Learn about the available options, methods and use cases.
Usage
import e from "validator";
await e.and([
e.object({ name: e.string() }, { allowUnexpectedProps: true }),
e.object({ age: e.number() }, { allowUnexpectedProps: true }),
]
)
.validate({ name: "John", age: 18 }); // returns { name: "John", age: 18 }Options
interface IAndValidatorOptions extends TBaseValidatorOptions {
// No specific options...
}Methods
Last updated