#1 Validator
Package validator implements value validations for structs and individual fields based on tags.
Package validation provides configurable and extensible rules for validating data of various types.
Health score 71/100, confidence 100/100.
| Latest version | v3.6.0+incompatible |
| Imported by | 1.3K packages |
| Stars | 4.1K |
| Forks | 240 |
| Last activity | 2 years ago |
| Latest release | v4.3.0 (5 years ago) |
| License | MIT |
| Known vuln records | 0 |
| Symbol | Kind | Synopsis |
|---|---|---|
| DateRule | Type | type DateRule struct{} |
| Date | Function | func Date(layout string) *DateRule |
| DateRule.Error | Method | func (r *DateRule) Error(message string) *DateRule |
| DateRule.Max | Method | func (r *DateRule) Max(max time.Time) *DateRule |
| DateRule.Min | Method | func (r *DateRule) Min(min time.Time) *DateRule |
| DateRule.RangeError | Method | func (r *DateRule) RangeError(message string) *DateRule |
| DateRule.Validate | Method | func (r *DateRule) Validate(value interface{}) error |
| EachRule | Type | type EachRule struct{} |
| Each | Function | func Each(rules ...Rule) *EachRule |
| EachRule.Validate | Method | func (r *EachRule) Validate(value interface{}) error |
| ErrFieldNotFound | Type | type ErrFieldNotFound int |
| ErrFieldNotFound.Error | Method | func (e ErrFieldNotFound) Error() string |
Package validator implements value validations for structs and individual fields based on tags.
[Go] Package of validators and sanitizers for strings, numerics, slices and structs
⚔ Go package for data validation and filtering. support Map, Struct, Form data. Go通用的数据验证与过滤库,使用简单,内置大部分常用验证、过滤器,支持自定义验证器、自定义消息、字段翻译。
Package validator implements value validations for structs and individual fields based on tags.
[Go] Package of validators and sanitizers for strings, numerics, slices and structs
⚔ Go package for data validation and filtering. support Map, Struct, Form data. Go通用的数据验证与过滤库,使用简单,内置大部分常用验证、过滤器,支持自定义验证器、自定义消息、字段翻译。
Validate Golang request data with simple rules. Highly inspired by Laravel's request validation.
Package validation provides methods for validating parameter value using reflection.