mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-13 07:15:39 +01:00
13 lines
303 B
TypeScript
13 lines
303 B
TypeScript
|
|
import { validate } from 'class-validator';
|
||
|
|
|
||
|
|
export const ValidateOptions = {
|
||
|
|
disableErrorMessages: true,
|
||
|
|
forbidNonWhitelisted: true,
|
||
|
|
forbidUnknownValues: true,
|
||
|
|
stopAtFirstError: true,
|
||
|
|
whitelist: true,
|
||
|
|
};
|
||
|
|
|
||
|
|
export const strictValidate = (object: object) =>
|
||
|
|
validate(object, ValidateOptions);
|