-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
197d69c
commit 191f898
Showing
17 changed files
with
193 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class AirportValidator : AbstractValidator<AirportDto> | ||
{ | ||
public AirportValidator() | ||
{ | ||
RuleFor(x => x.Icao).NotEmpty().Length(4); | ||
RuleFor(x => x.Name).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class CommentValidator : AbstractValidator<CommentDto> | ||
{ | ||
public CommentValidator() | ||
{ | ||
RuleFor(x => x.UserId).NotEmpty().GreaterThan(0); | ||
RuleFor(x => x.Title).NotEmpty(); | ||
RuleFor(x => x.Description).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class EventPositionValidator : AbstractValidator<EventPositionDto> | ||
{ | ||
public EventPositionValidator() | ||
{ | ||
RuleFor(x => x.EventId).NotEmpty(); | ||
RuleFor(x => x.Name).NotEmpty(); | ||
RuleFor(x => x.MinRating).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class EventRegistrationValidator : AbstractValidator<EventRegistrationDto> | ||
{ | ||
public EventRegistrationValidator() | ||
{ | ||
RuleFor(x => x.EventId).NotEmpty(); | ||
RuleFor(x => x.EventPositionId).NotEmpty(); | ||
RuleFor(x => x.Start).NotEmpty(); | ||
RuleFor(x => x.End).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class EventValidator : AbstractValidator<EventDto> | ||
{ | ||
public EventValidator() | ||
{ | ||
RuleFor(x => x.Title).NotEmpty(); | ||
RuleFor(x => x.Description).NotEmpty(); | ||
RuleFor(x => x.Host).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class FaqValidator : AbstractValidator<FaqDto> | ||
{ | ||
public FaqValidator() | ||
{ | ||
RuleFor(x => x.Question).NotEmpty(); | ||
RuleFor(x => x.Answer).NotEmpty(); | ||
RuleFor(x => x.Order).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class FeedbackValidator : AbstractValidator<FeedbackDto> | ||
{ | ||
public FeedbackValidator() | ||
{ | ||
RuleFor(x => x.ControllerId).NotEmpty().GreaterThan(0); | ||
RuleFor(x => x.ControllerCallsign).NotEmpty(); | ||
RuleFor(x => x.Description).NotEmpty(); | ||
RuleFor(x => x.Level).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class FileValidator : AbstractValidator<FileDto> | ||
{ | ||
public FileValidator() | ||
{ | ||
RuleFor(x => x.Title).NotEmpty(); | ||
RuleFor(x => x.Description).NotEmpty(); | ||
RuleFor(x => x.Version).NotEmpty(); | ||
RuleFor(x => x.Type).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class OtsValidator : AbstractValidator<OtsDto> | ||
{ | ||
public OtsValidator() | ||
{ | ||
RuleFor(x => x.Submitter).NotEmpty(); | ||
RuleFor(x => x.User).NotEmpty(); | ||
RuleFor(x => x.Milestone).NotEmpty(); | ||
RuleFor(x => x.Facility).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Models; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class TrainingMilestoneValidator : AbstractValidator<TrainingMilestone> | ||
{ | ||
public TrainingMilestoneValidator() | ||
{ | ||
RuleFor(x => x.Code).NotEmpty(); | ||
RuleFor(x => x.Name).NotEmpty(); | ||
RuleFor(x => x.Facility).NotEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using FluentValidation; | ||
using Memphis.Shared.Dtos; | ||
|
||
namespace Memphis.Shared.Validators; | ||
|
||
public class TrainingScheduleValidator : AbstractValidator<TrainingScheduleDto> | ||
{ | ||
public TrainingScheduleValidator() | ||
{ | ||
RuleFor(x => x.TrainingTypes).NotEmpty(); | ||
RuleFor(x => x.Start).NotEmpty(); | ||
} | ||
} |