is not empty
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export class Modulo {
|
||||
@Column({ type: Boolean, nullable: false, default: false })
|
||||
activo: boolean;
|
||||
|
||||
@Column({ type: String, nullable: false, length: 50 })
|
||||
@Column({ type: String, nullable: false, length: 30 })
|
||||
modulo: string;
|
||||
|
||||
@ManyToOne(() => Institucion, (institucion) => institucion.modulos, {
|
||||
|
||||
Reference in New Issue
Block a user