Go Validation

Open-source Go projects categorized as Validation

Top 23 Go Validation Projects

  • validator

    :100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving

    Project mention: Go custom struct validation - the idiomatic way | dev.to | 2023-01-14

    In the previous blog, we had gone over struct validations in golang using validator library. Continuing on, in this blog, we'll cover custom validations.

  • govalidator

    [Go] Package of validators and sanitizers for strings, numerics, slices and structs

    Project mention: Restful API with Golang practical approach | dev.to | 2022-10-17

    govalidator: A package of validators and sanitisers for strings, structs and collections (https://github.com/asaskevich/govalidator)

  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • cue

    The new home of the CUE language! Validate and define text-based and dynamic configuration

    Project mention: Ask HN: Do you use JSON Schema? Help us shape its future stability guarantees | news.ycombinator.com | 2023-01-30

    - Most YAML based configuration files.

    GraphQL doesn't quite supersede JSONSchema because it doesn't deal with validation. (Something like Cue (https://cuelang.org/) might)

    Type systems are not typically cross-language, which is where JSONSchema tends to be used a lot.

    There are indeed a lot of openapi-based client generators. This one, for example, has been around for quite some time: https://github.com/OpenAPITools/openapi-generator

  • ozzo-validation

    An idiomatic Go (golang) validation package. Supports configurable and extensible validation rules (validators) using normal language constructs instead of error-prone struct tags.

    Project mention: Suggestion for a dynamic Struct Validation Rules | reddit.com/r/golang | 2022-12-21

    https://github.com/go-ozzo/ozzo-validation Seems to do what I need but likely will need some convoluted reflection to build out the rules. Also likely some custom rules to be written which is okay since it's a one time cost and reuse in the expressions.

  • protoc-gen-validate

    protoc plugin to generate polyglot message validators

    Project mention: Protobuf Schema Validation | reddit.com/r/golang | 2022-12-29
  • filetype

    Fast, dependency-free Go package to infer binary file types based on the magic numbers header signature

    Project mention: Reading/passing file as byte or string... | reddit.com/r/golang | 2022-11-21

    Would this library help you? https://github.com/h2non/filetype

  • kpt

    Automate Kubernetes Configuration Editing

    Project mention: Is it possible to use a conditional in the values.yaml file? | reddit.com/r/kubernetes | 2022-06-27

    Why are you using a conditional in a declaration? There is https://github.com/GoogleContainerTools/kpt

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

  • Package govalidator

    Validate Golang request data with simple rules. Highly inspired by Laravel's request validation. (by thedevsaddam)

  • go-proto-validators

    Generate message validators from .proto annotations.

    Project mention: Understanding gRPC Concepts, Use Cases & Best Practices | dev.to | 2023-01-15

    protoc-gen-go-validators — a plugin that allows to define validation rules for proto message fields. It generates a Validate() error method for proto messages you can call in Go to validate if the message matches your predefined expectations.

  • kubeconform

    A FAST Kubernetes manifests validator, with support for Custom Resources!

    Project mention: [Show] Detecting YAML Issues Early | reddit.com/r/kubernetes | 2022-10-25

    How is it different from https://github.com/yannh/kubeconform?

  • encoding

    Go package containing implementations of efficient encoding, decoding, and validation APIs.

    Project mention: Quickly checking that a string belongs to a small set | news.ycombinator.com | 2022-12-30

    We took a similar approach in our JSON decoder. We needed to support sets (JSON object keys) that aren't necessarily known until runtime, and strings that are up to 16 bytes in length.

    We got better performance with a linear scan and SIMD matching than with a hash table or a perfect hashing scheme.

    See https://github.com/segmentio/asm/pull/57 (AMD64) and https://github.com/segmentio/asm/pull/65 (ARM64). Here's how it's used in the JSON decoder: https://github.com/segmentio/encoding/pull/101

  • Validate

    ⚔ Go package for data validation and filtering. support Map, Struct, Form data. Go通用的数据验证与过滤库,使用简单,内置大部分常用验证、过滤器,支持自定义验证器、自定义消息、字段翻译。

    Project mention: GitHub - gookit/validate: ⚔ Go package for data validation and filtering. support Map, Struct, Form data. | reddit.com/r/golang | 2022-06-12
  • checkmail

    Golang package for email validation

  • email-verifier

    :white_check_mark: A Go library for email verification without sending any emails.

  • jsonschema

    JSONSchema (draft 2020-12, draft 2019-09, draft-7, draft-6, draft-4) Validation using Go (by santhosh-tekuri)

    Project mention: Validating dynamic JSON user input | reddit.com/r/golang | 2022-10-29

    If I were doing it, I would define struct that match the data you expect and update those struct as the project progresses. Also if I were doing it I'd explicitly not allow values with different types for the same key so that would prevent me from having to declare value types as interface{}. If you want a more general purpose validation of arbitrary JSON, you could define a JSON schema and validate it with a library like this.

  • graphql-go-tools

    Tools to write high performance GraphQL applications using Go/Golang.

    Project mention: GraphQL is not Terraform | dev.to | 2022-10-18

    It's now almost 4 years ago since I started "implementing" GraphQL in Go. When experimenting with a new tool, it's obvious that you want to use it everywhere, and so I did.

  • validating

    A Go library for validating structs, maps and slices.

    Project mention: validating v3.0.0-beta.0 - Benefiting from Go generics | reddit.com/r/golang | 2022-03-20

    release notes: https://github.com/RussellLuo/validating/releases/tag/v3.0.0-beta.0

  • grimoire

    Database access layer for golang

  • checkdigit

    Provide check digit algorithms and calculators written in Go

  • go-map-schema

    Simple JSON type checking.

  • Handy Go utilities

    GO Golang Utilities and helpers like validators and string formatters

  • jio

    jio is a json schema validator similar to joi

  • gody

    :balloon: A lightweight struct validator for Go

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-01-30.

Go Validation related posts

Index

What are some of the best open-source Validation projects in Go? This list will help you:

Project Stars
1 validator 12,325
2 govalidator 5,597
3 cue 3,529
4 ozzo-validation 3,066
5 protoc-gen-validate 2,925
6 filetype 1,698
7 kpt 1,401
8 Package govalidator 1,179
9 go-proto-validators 971
10 kubeconform 924
11 encoding 887
12 Validate 834
13 checkmail 643
14 email-verifier 617
15 jsonschema 546
16 graphql-go-tools 441
17 validating 213
18 grimoire 159
19 checkdigit 96
20 go-map-schema 87
21 Handy Go utilities 73
22 jio 71
23 gody 62
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com