project reorganized
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using FluentValidation;
|
||||
using WatchIt.Common.Model.Genres;
|
||||
using WatchIt.Database;
|
||||
|
||||
namespace WatchIt.WebAPI.Validators.Genres;
|
||||
|
||||
public class GenreRequestValidator : AbstractValidator<GenreRequest>
|
||||
{
|
||||
public GenreRequestValidator()
|
||||
{
|
||||
RuleFor(x => x.Name).MaximumLength(100);
|
||||
When(x => !string.IsNullOrWhiteSpace(x.Description), () => RuleFor(x => x.Description).MaximumLength(1000));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user