* add blocks, block groups * basic block and block item editing * add template groups and basic template editing (name) * add blocks to template calendar * edit playout templates * add calendar preview to playout templates * add basic block playout building * add mysql migration * update changelog
15 lines
468 B
C#
15 lines
468 B
C#
using ErsatzTV.ViewModels;
|
|
using FluentValidation;
|
|
|
|
namespace ErsatzTV.Validators;
|
|
|
|
public class PlayoutEditViewModelValidator : AbstractValidator<PlayoutEditViewModel>
|
|
{
|
|
public PlayoutEditViewModelValidator()
|
|
{
|
|
RuleFor(p => p.Channel).NotNull();
|
|
RuleFor(p => p.ProgramSchedule).NotNull().When(p => string.IsNullOrWhiteSpace(p.Kind));
|
|
RuleFor(p => p.ExternalJsonFile).NotNull().When(p => p.Kind == PlayoutKind.ExternalJson);
|
|
}
|
|
}
|