Skip to content

postgrelize / ValidateOptions

Type Alias: ValidateOptions ​

ValidateOptions = Readonly<{ fields?: readonly string[]; hooks?: boolean; skip?: readonly string[]; }>

Defined in: src/model/instance-lifecycle-services.ts:27

Options of instance.validate().

Validation throws ValidationError when an attribute is invalid.

See ​

Model.validate

Example ​

ts
const opts: ValidateOptions = { skip: ['password'], hooks: false };
await user.validate(opts);

Released under the MIT License.