18 lines
587 B
C#
18 lines
587 B
C#
using FluentValidation;
|
|
|
|
namespace TeleWave.Application.Broadcast.UpdateChannelSettings;
|
|
|
|
public sealed class UpdateChannelSettingsCommandValidator
|
|
: AbstractValidator<UpdateChannelSettingsCommand>
|
|
{
|
|
public UpdateChannelSettingsCommandValidator()
|
|
{
|
|
RuleFor(x => x.Name).NotEmpty().MaximumLength(256);
|
|
RuleFor(x => x.AdsPerBreak).InclusiveBetween(0, 10);
|
|
|
|
RuleFor(x => x.Bumper.MinIntervalMinutes).InclusiveBetween(0, 1440);
|
|
RuleFor(x => x.Bumper.NowLabel).MaximumLength(64);
|
|
RuleFor(x => x.Bumper.NextLabel).MaximumLength(64);
|
|
}
|
|
}
|