添加项目文件。
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using Atomx.Admin.Client.Models;
|
||||
using FluentValidation;
|
||||
|
||||
namespace Atomx.Admin.Client.Validators
|
||||
{
|
||||
public class AddressModelValidator : AbstractValidator<AddressModel>
|
||||
{
|
||||
public AddressModelValidator()
|
||||
{
|
||||
RuleFor(p => p.Name).NotEmpty().WithMessage("请填写收件人信息");
|
||||
RuleFor(p => p.Email).EmailAddress().When(p => !string.IsNullOrEmpty(p.Email)).WithMessage("请填写你常用的邮箱地址");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user