18 lines
583 B
C#
18 lines
583 B
C#
using FluentValidation;
|
|
|
|
namespace TeleWave.Application.Broadcast.Bumpers;
|
|
|
|
public sealed class UpdateBumperTextVariantCommandValidator
|
|
: AbstractValidator<UpdateBumperTextVariantCommand>
|
|
{
|
|
public UpdateBumperTextVariantCommandValidator()
|
|
{
|
|
RuleFor(x => x.Name).NotEmpty().MaximumLength(64);
|
|
RuleFor(x => x.NowLabel).MaximumLength(64);
|
|
RuleFor(x => x.NextLabel).MaximumLength(64);
|
|
RuleFor(x => x.Line1).MaximumLength(120);
|
|
RuleFor(x => x.Line2).MaximumLength(120);
|
|
RuleFor(x => x.Weight).InclusiveBetween(0, 1000);
|
|
}
|
|
}
|