Added Label on dto from Random Challenge
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
public class GetRandomChallengeDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Label { get; set; }
|
||||
public string? Libelle { get; set; }
|
||||
public int Duration { get; set; }
|
||||
public bool IsAlreadyPast { get; set; }
|
||||
|
||||
@@ -8,6 +8,14 @@ public class GetRandomChallengeDtoValidator : Validator<GetRandomChallengeDto>
|
||||
{
|
||||
public GetRandomChallengeDtoValidator()
|
||||
{
|
||||
RuleFor(x => x.Label)
|
||||
.NotEmpty()
|
||||
.WithMessage("Label is required")
|
||||
.MaximumLength(200)
|
||||
.WithMessage("Label cannot exceed 200 characters")
|
||||
.MinimumLength(2)
|
||||
.WithMessage("Label must exceed 2 characters");
|
||||
|
||||
RuleFor(x => x.Libelle)
|
||||
.NotEmpty()
|
||||
.WithMessage("Libelle is required")
|
||||
|
||||
Reference in New Issue
Block a user