is not empty

This commit is contained in:
xXpuma99Xx
2022-07-24 22:35:00 -05:00
parent 79996060ef
commit 254504f7a9
77 changed files with 511 additions and 301 deletions
+3 -1
View File
@@ -1,9 +1,11 @@
import { IsInt, IsString } from 'class-validator';
import { IsInt, IsNotEmpty, IsString, MaxLength } from 'class-validator';
export class CreateModuloDto {
@IsInt()
id_institucion: number;
@IsString()
@IsNotEmpty()
@MaxLength(30)
modulo: string;
}
+10 -1
View File
@@ -1,4 +1,11 @@
import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator';
import {
IsBoolean,
IsInt,
IsNotEmpty,
IsOptional,
IsString,
MaxLength,
} from 'class-validator';
export class UpdateModuloDto {
@IsInt()
@@ -9,6 +16,8 @@ export class UpdateModuloDto {
activo?: boolean;
@IsString()
@IsNotEmpty()
@MaxLength(30)
@IsOptional()
modulo?: string;
}