fix ValidationResult问题
This commit is contained in:
@@ -18,6 +18,7 @@ public class WorkGridScheduleSaveRequest : IValidatableObject
|
||||
/// <summary>
|
||||
/// 班次
|
||||
/// </summary>
|
||||
[EnumDataType(typeof(WorkGridTimePeriodEnumType))]
|
||||
public WorkGridTimePeriodEnumType PeriodType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -31,7 +32,7 @@ public class WorkGridScheduleSaveRequest : IValidatableObject
|
||||
var now = DateTime.Now;
|
||||
if (Date.ToDateTime(new TimeOnly(0, 0)) < now.Date)
|
||||
{
|
||||
yield return new ValidationResult("不可编辑历史数据");
|
||||
yield return new ValidationResult("不可编辑历史数据", new[] { nameof(Date) });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user