fix 处理都不选预约类型错误

This commit is contained in:
2024-10-18 17:16:46 +08:00
parent 0bf38e26c3
commit 48089940a3

View File

@@ -88,6 +88,11 @@ public class AppointmentReceiveItemDto : IValidatableObject
/// <inheritdoc />
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (IsEnterDoorArea == false && IsEnterWorkplace == false)
{
yield return new ValidationResult("请选择预约类型", new[] { nameof(IsEnterDoorArea) });
}
if (IsEnterDoorArea)
{
if (ApplyDoorArea.IsEmpty())