Cleaned code
This commit is contained in:
@@ -15,7 +15,7 @@ public class CreateMemberDtoValidator : Validator<CreateMemberDto>
|
||||
.WithMessage("Email is invalid.")
|
||||
.MaximumLength(255)
|
||||
.WithMessage("Email cannot be longer than 255 characters.");
|
||||
|
||||
|
||||
RuleFor(x => x.FirstName)
|
||||
.NotEmpty()
|
||||
.WithMessage("First name is required.")
|
||||
@@ -23,7 +23,7 @@ public class CreateMemberDtoValidator : Validator<CreateMemberDto>
|
||||
.WithMessage("First name cannot be longer than 100 characters.")
|
||||
.MinimumLength(2)
|
||||
.WithMessage("First name cannot be shorter than 2 characters.");
|
||||
|
||||
|
||||
RuleFor(x => x.LastName)
|
||||
.NotEmpty()
|
||||
.WithMessage("Last name is required.")
|
||||
@@ -31,7 +31,7 @@ public class CreateMemberDtoValidator : Validator<CreateMemberDto>
|
||||
.WithMessage("Last name cannot be longer than 100 characters.")
|
||||
.MinimumLength(2)
|
||||
.WithMessage("Last name cannot be shorter than 2 characters.");
|
||||
|
||||
|
||||
RuleFor(x => x.MembershipDate)
|
||||
.NotEmpty()
|
||||
.WithMessage("Membership date is required.")
|
||||
|
||||
@@ -11,7 +11,7 @@ public class UpdateMemberDtoValidator : Validator<UpdateMemberDto>
|
||||
RuleFor(x => x.Id)
|
||||
.GreaterThan(0)
|
||||
.WithMessage("Id is invalid.");
|
||||
|
||||
|
||||
RuleFor(x => x.Email)
|
||||
.NotEmpty()
|
||||
.WithMessage("Email is required.")
|
||||
@@ -19,7 +19,7 @@ public class UpdateMemberDtoValidator : Validator<UpdateMemberDto>
|
||||
.WithMessage("Email is invalid.")
|
||||
.MaximumLength(255)
|
||||
.WithMessage("Email cannot be longer than 255 characters.");
|
||||
|
||||
|
||||
RuleFor(x => x.FirstName)
|
||||
.NotEmpty()
|
||||
.WithMessage("First name is required.")
|
||||
@@ -27,7 +27,7 @@ public class UpdateMemberDtoValidator : Validator<UpdateMemberDto>
|
||||
.WithMessage("First name cannot be longer than 100 characters.")
|
||||
.MinimumLength(2)
|
||||
.WithMessage("First name cannot be shorter than 2 characters.");
|
||||
|
||||
|
||||
RuleFor(x => x.LastName)
|
||||
.NotEmpty()
|
||||
.WithMessage("Last name is required.")
|
||||
@@ -35,7 +35,7 @@ public class UpdateMemberDtoValidator : Validator<UpdateMemberDto>
|
||||
.WithMessage("Last name cannot be longer than 100 characters.")
|
||||
.MinimumLength(2)
|
||||
.WithMessage("Last name cannot be shorter than 2 characters.");
|
||||
|
||||
|
||||
RuleFor(x => x.MembershipDate)
|
||||
.NotEmpty()
|
||||
.WithMessage("Membership date is required.")
|
||||
|
||||
Reference in New Issue
Block a user