fix(playlists): reject empty/whitespace name and description on update
This commit is contained in:
@@ -8,10 +8,12 @@ public sealed class UpdatePlayListRequestValidator : AbstractValidator<UpdatePla
|
||||
public UpdatePlayListRequestValidator()
|
||||
{
|
||||
RuleFor(x => x.NewName)
|
||||
.NotEmpty()
|
||||
.MaximumLength(50)
|
||||
.When(x => x.NewName is not null);
|
||||
|
||||
RuleFor(x => x.NewDescription)
|
||||
.NotEmpty()
|
||||
.MaximumLength(256)
|
||||
.When(x => x.NewDescription is not null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user