ICode9

精准搜索请尝试: 精确搜索
  • c# – 使用FluentValidation验证互斥字段2019-05-28 12:55:27

    我试图使用FluentValidation验证三个字段中只有一个具有值. RuleFor(x => x.Date1) .Must(x => !x.HasValue) .When(x => x.Date2.HasValue || x.Date3.HasValue) .WithMessage("Select only one of Date 1, Date 2 and Date 3"); 其他2个

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有