Add project files.
This commit is contained in:
		| @@ -0,0 +1,14 @@ | ||||
| using Core.Cerberos.Application.UseCases.Modules.Input; | ||||
| using FluentValidation; | ||||
|  | ||||
| namespace Core.Cerberos.Application.UseCases.Modules.Validator | ||||
| { | ||||
|     public class ChangeModuleStatusValidator : AbstractValidator<ChangeModuleStatusRequest> | ||||
|     { | ||||
|         public ChangeModuleStatusValidator() | ||||
|         { | ||||
|             RuleFor(i => i.Id).NotEmpty().NotNull().OverridePropertyName(x => x.Id).WithName("Module ID").WithMessage("Module ID is Obligatory."); | ||||
|             RuleFor(i => i.Status).NotNull().OverridePropertyName(x => x.Status).WithName("Status").WithMessage("Status is Obligatory."); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,15 @@ | ||||
| using Core.Cerberos.Application.UseCases.Modules.Input; | ||||
| using FluentValidation; | ||||
|  | ||||
| namespace Core.Cerberos.Application.UseCases.Modules.Validator | ||||
| { | ||||
|     public class CreateModuleValidator : AbstractValidator<CreateModuleRequest> | ||||
|     { | ||||
|         public CreateModuleValidator() | ||||
|         { | ||||
|             RuleFor(i => i.Name).NotEmpty().NotNull().OverridePropertyName(x => x.Name).WithName("Module Name").WithMessage("Module Name is Obligatory."); | ||||
|             RuleFor(i => i.Route).NotEmpty().NotNull().OverridePropertyName(x => x.Route).WithName("Module Route").WithMessage("Module Route is Obligatory."); | ||||
|             RuleFor(i => i.Application).NotEmpty().NotNull().OverridePropertyName(x => x.Application).WithName("Application").WithMessage("Application is Obligatory."); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,14 @@ | ||||
| using Core.Cerberos.Application.UseCases.Modules.Input; | ||||
| using FluentValidation; | ||||
|  | ||||
| namespace Core.Cerberos.Application.UseCases.Modules.Validator | ||||
| { | ||||
|     public class GetAllModulesByListValidator : AbstractValidator<GetAllModulesByListRequest> | ||||
|     { | ||||
|         public GetAllModulesByListValidator() | ||||
|         { | ||||
|             RuleFor(i => i.Modules).NotEmpty().NotNull().OverridePropertyName(x => x.Modules).WithName("Modules").WithMessage("Modules are Obligatory."); | ||||
|         } | ||||
|  | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,15 @@ | ||||
| using Core.Cerberos.Application.UseCases.Modules.Input; | ||||
| using FluentValidation; | ||||
|  | ||||
| namespace Core.Cerberos.Application.UseCases.Modules.Validator | ||||
| { | ||||
|     public class UpdateModuleValidator : AbstractValidator<UpdateModuleRequest> | ||||
|     { | ||||
|         public UpdateModuleValidator() | ||||
|         { | ||||
|             RuleFor(i => i.Name).NotEmpty().NotNull().OverridePropertyName(x => x.Name).WithName("Module Name").WithMessage("Module Name is Obligatory."); | ||||
|             RuleFor(i => i.Application).NotEmpty().NotNull().OverridePropertyName(x => x.Application).WithName("Application").WithMessage("Application is Obligatory."); | ||||
|             RuleFor(i => i.Route).NotEmpty().NotNull().OverridePropertyName(x => x.Route).WithName("Module Route").WithMessage("Module Route is Obligatory."); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Sergio Matias Urquin
					Sergio Matias Urquin