Newbe.ObjectVisitor 0.4.4 发布,模型验证器上线

2020-12-09 10:15:19 浏览数 (1)

Newbe.Claptrap 0.4.4 发布,模型验证器上线。

更新内容

完全基于表达式树的模型验证器

本版本,我们带来了基于表达式树实现的模型验证器。并实现了很多内置的验证方法。

我们罗列了与 FluentValidation 比较的情况:

Build in Validators

FluentValidation 9.X

Newbe.ObjectVistor

NotNull

✔️

✔️ NotNull; class

NotEmpty

✔️

✔️ NotEmpty; string,enumerable

NotEqual

✔️

✔️ NotEqual; all

Equal

✔️

✔️ Equal; all

Length

✔️

✔️ Length; string,enumerable

MaxLength

✔️

✔️ MaxLength; string,enumerable

MinLength

✔️

✔️ MinLength; string,enumerable

Less Than

✔️

✔️ LessThan; number

Less Than Or Equal

✔️

✔️ LessThanOrEqual; number

Greater Than

✔️

✔️ GreaterThan; number

Greater Than Or Equal

✔️

✔️ GreaterThanOrEqual; number

Predicate

✔️

✔️ Validate; all

Regular Expression

✔️

✔️ MatchRegex,NotMatchRegex; string

Email

✔️

0 人点赞