{"repo":"go-ozzo/ozzo-validation","free":true,"listed":false,"github":"https://github.com/go-ozzo/ozzo-validation","clone":"git clone https://github.com/go-ozzo/ozzo-validation.git","description":"An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.","language":"Go","stars":4125,"topics":["validation","golang","go","ozzo","validator"],"license":"MIT","category":"databases-storage","readme_excerpt":"ozzo-validation Description ozzo-validation is a Go package that provides configurable and extensible data validation capabilities. It has the following features: use normal programming constructs rather than error-prone struct tags to specify how data should be validated. can validate data of different types, e.g., structs, strings, byte slices, slices, maps, arrays. can validate custom data types as long as they implement the Validatable interface. can validate data types that implement the sql.Valuer interface (e.g. sql.NullString ). customizable and well-formatted validation errors. error code and message translation support. provide a rich set of validation rules right out of box. extremely easy to create and use custom validation rules. For an example on how this library is used in an application, please refer to go-rest-api which is a starter kit for building RESTful APIs in Go. Requirements Go 1.13 or above. Getting Started The ozzo-validation package mainly includes a set of validation rules and two validation methods. You use validation rules to describe how a value should be considered valid, and you call either validation.Validate() or validation.ValidateStruct() to validate the value. Installation Run the following command to install the package: Validating a Simple Value For a simple value, such as a string or an integer, you may use validation.Validate() to validate it. For example, The method validation.Validate() will run through the rules in the order that t","default_branch":null,"files":null,"tree":[],"storefront":"/r/go-ozzo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/go-ozzo/ozzo-validation/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}