diff --git a/app/templates/nestjsMongoose/__name__Validator.ts.txt b/app/templates/nestjsMongoose/__name__Validator.ts.txt index 591ef18..26f3bc5 100644 --- a/app/templates/nestjsMongoose/__name__Validator.ts.txt +++ b/app/templates/nestjsMongoose/__name__Validator.ts.txt @@ -3,13 +3,13 @@ import { Validator } from '@secjs/validator' @Injectable() export class <%= namePascal %>Validator extends Validator { - createSchema = () => { + get schema() { return { name: 'string|required', } } - updateSchema = () => { + get updateSchema() { return { name: 'string', } diff --git a/app/templates/nestjsPrismaOrm/__name__Validator.ts.txt b/app/templates/nestjsPrismaOrm/__name__Validator.ts.txt index 591ef18..26f3bc5 100644 --- a/app/templates/nestjsPrismaOrm/__name__Validator.ts.txt +++ b/app/templates/nestjsPrismaOrm/__name__Validator.ts.txt @@ -3,13 +3,13 @@ import { Validator } from '@secjs/validator' @Injectable() export class <%= namePascal %>Validator extends Validator { - createSchema = () => { + get schema() { return { name: 'string|required', } } - updateSchema = () => { + get updateSchema() { return { name: 'string', } diff --git a/app/templates/nestjsTypeOrm/__name__Validator.ts.txt b/app/templates/nestjsTypeOrm/__name__Validator.ts.txt index 591ef18..26f3bc5 100644 --- a/app/templates/nestjsTypeOrm/__name__Validator.ts.txt +++ b/app/templates/nestjsTypeOrm/__name__Validator.ts.txt @@ -3,13 +3,13 @@ import { Validator } from '@secjs/validator' @Injectable() export class <%= namePascal %>Validator extends Validator { - createSchema = () => { + get schema() { return { name: 'string|required', } } - updateSchema = () => { + get updateSchema() { return { name: 'string', }