We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Description("比如tags=hello&tags=world")] [FromQuery] public string[]? Tags { get; set; } [Description("querystring比如?member={\"id\":\"123\",\"userName\":\"vipwan\"}")] [FromQuery(Name = "member")] public Member CurrentMember { get; set; } [Description("header比如{\"id\":\"123\",\"userName\":\"vipwan\"}")] [FromHeader(Name = "headmember")] public Member CurrentMemberFromHeader { get; set; } public record Member(string Id,string UserName); //并且支持属性多级的校验 public HelloApiRequest() { RuleFor(x=>x.CurrentMember.UserName).EmailAddress(); //请注意多级验证务必添加When表达式 RuleFor(x=>x.CurrentMemberFromHeader.UserName).EmailAddress().When(x => x.CurrentMemberFromHeader!= null); }
The text was updated successfully, but these errors were encountered:
[FromQuery]支持数组和复杂对象 #14
43e256d
#14
b5eeb11
#14 and valueType&Enum support
8aac3aa
No branches or pull requests
The text was updated successfully, but these errors were encountered: