Newbe.ObjectVisitor 0.4.4 釋出,模型驗證器上線
阿新 • • 發佈:2020-12-09
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 | ✔️ |