git-subtree-dir: Musify.WebApi git-subtree-mainline:9d433868ccgit-subtree-split:ca8750c3b4
19 lines
499 B
C#
19 lines
499 B
C#
using FluentValidation;
|
|
using WebApi.DataTransferObjects.PlayLists;
|
|
|
|
namespace WebApi.Validators.PlayLists;
|
|
|
|
public sealed class UpdatePlayListRequestValidator : AbstractValidator<UpdatePlayListRequest>
|
|
{
|
|
public UpdatePlayListRequestValidator()
|
|
{
|
|
RuleFor(x => x.NewName)
|
|
.MaximumLength(50)
|
|
.When(x => x.NewName is not null);
|
|
|
|
RuleFor(x => x.NewDescription)
|
|
.MaximumLength(256)
|
|
.When(x => x.NewDescription is not null);
|
|
}
|
|
}
|