fix 移除source判断
This commit is contained in:
@@ -42,7 +42,6 @@ public class EMealVoucherReceiveRequest : IValidatableObject
|
||||
/// <summary>
|
||||
/// 来宾来源
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "来宾来源不能为空")]
|
||||
public string Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -78,11 +77,6 @@ public class EMealVoucherReceiveRequest : IValidatableObject
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (Number != Details.Count)
|
||||
{
|
||||
yield return new ValidationResult("来宾数量不匹配", new[] { nameof(Number) });
|
||||
}
|
||||
|
||||
if (Details.DistinctBy(x => x.IdNo).Count() != Details.Count)
|
||||
{
|
||||
yield return new ValidationResult("证件信息重复", new[] { "IdNo" });
|
||||
|
||||
Reference in New Issue
Block a user