awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
go-playground avatar

go-playground/validator

0
View on GitHub↗
20,028 stars·1,430 forks·Go·MIT·7 vues

Validator

This is a Go struct validation library used to maintain data integrity by enforcing constraints on fields, slices, and maps. It functions as a schema validation tool and data integrity validator, ensuring that complex nested structures adhere to predefined rules.

The library utilizes struct tags to configure validation logic at runtime and supports a custom function registry for extending validation rules. It is distinguished by its ability to perform cross-field dependency evaluation, allowing the comparison of values between different fields within the same data structure to ensure logical consistency.

Its capabilities cover field logic enforcement, such as value thresholds and range checks, as well as pattern matching for standard format verification. This includes specialized network identifier validation for IP addresses, CIDR blocks, hostnames, and URLs, alongside system resource validation for verifying files and directories on a host system.

Features

  • Struct Tags - Utilizes Go struct tags to define and configure validation constraints that are parsed at runtime.
  • Schema Validation Tools - Provides a comprehensive framework for defining and validating complex Go data structures and nested arrays using struct tags.
  • Data Integrity and Validation - Enforces structural consistency and schema compliance to ensure overall data integrity.
  • Data Validation - Enforces structural rules and schema constraints on incoming data to ensure overall integrity.
  • Cross-Field Validators - Evaluates logical consistency and relative size by comparing values between multiple fields in a data model.
  • Recursive Hierarchy Validation - Performs full-tree recursive validation of nested structs, slices, and maps to ensure structural integrity.
  • Network Identifier Formats - Implements specialized validation for network identifiers including IP addresses, CIDR blocks, hostnames, and URLs.
  • Go Validation Libraries - A comprehensive library for verifying the correctness of Go data structures using tag-based constraints.
  • Constraint-Based Logic Engines - Implements a logic engine that evaluates input values against predefined and custom rule predicates to ensure data validity.
  • Cross-Field Dependencies - Provides validation rules that link requirements and values between different fields within the same data structure.
  • Go Data Validation - Specifically designed to validate Go-native types like structs and maps against defined business rules.
  • Field Constraints - Enforces field-level constraints including length, range, and presence to control data requirements.
  • Network Address Validators - Verifies that network identifiers such as IP addresses, CIDR blocks, and hostnames conform to standard formats.
  • Function Registries - Maintains a registry where custom validator functions are mapped to string identifiers for dynamic lookup during evaluation.
  • Input Format Verifications - Checks that input strings match standard patterns like email and URL formats to prevent malformed data.
  • Value Inspection - Uses the Go reflection package to dynamically inspect field types and values without requiring explicit type assertions.
  • Request Validation - Provides utilities for validating incoming network data and user inputs against defined constraints before processing.
  • Constant Value Validations - Provides equality and inequality operators to validate that values match specific constants or thresholds.
  • Standard Format Verifications - Verifies that strings match globally recognized standards such as email addresses and digital identifiers.
  • String Format Validators - Ensures strings adhere to specific character sets, casing, and patterns, including alphanumeric and unicode checks.
  • Validation Libraries - Struct and field validation with cross-field support.

Historique des stars

Graphique de l'historique des stars pour go-playground/validatorGraphique de l'historique des stars pour go-playground/validator

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Validator

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Validator.
  • asaskevich/govalidatorAvatar de asaskevich

    asaskevich/govalidator

    6,203Voir sur GitHub↗

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

    Gogogovalidatorsanitization
    Voir sur GitHub↗6,203
  • go-validator/validatorAvatar de go-validator

    go-validator/validator

    1,335Voir sur GitHub↗

    This project is a data validation framework for the Go programming language that enforces integrity by applying declarative constraints to struct fields. It utilizes reflection to inspect data structures at runtime, mapping field-level requirements defined in struct tags to specific validation logic. The library distinguishes itself through its ability to handle complex object graphs by recursively traversing nested structures and slices. It supports context-aware validation, allowing developers to switch between different rule sets for the same data structure based on application state or sp

    Go
    Voir sur GitHub↗1,335
  • go-ozzo/ozzo-validationAvatar de go-ozzo

    go-ozzo/ozzo-validation

    4,072Voir sur GitHub↗

    ozzo-validation is a programmable data validation library for Go that verifies structs, maps, and primitive types using a declarative, rule-based approach. It functions as an interface-based validator, allowing for the recursive checking of nested data structures and custom types without the use of struct tags. The framework distinguishes itself as a context-aware validation engine, supporting the propagation of request-scoped data to rules that depend on external state. It provides extensive extensibility through custom rule definitions and the ability to override default failure text with l

    Gogogolangozzo
    Voir sur GitHub↗4,072
  • open-circle/valibotAvatar de open-circle

    open-circle/valibot

    8,769Voir sur GitHub↗

    Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.

    TypeScriptbundle-sizemodularparsing
    Voir sur GitHub↗8,769
Voir les 30 alternatives à Validator→

Questions fréquentes

Que fait go-playground/validator ?

This is a Go struct validation library used to maintain data integrity by enforcing constraints on fields, slices, and maps. It functions as a schema validation tool and data integrity validator, ensuring that complex nested structures adhere to predefined rules.

Quelles sont les fonctionnalités principales de go-playground/validator ?

Les fonctionnalités principales de go-playground/validator sont : Struct Tags, Schema Validation Tools, Data Integrity and Validation, Data Validation, Cross-Field Validators, Recursive Hierarchy Validation, Network Identifier Formats, Go Validation Libraries.

Quelles sont les alternatives open-source à go-playground/validator ?

Les alternatives open-source à go-playground/validator incluent : asaskevich/govalidator — [Go] Package of validators and sanitizers for strings, numerics, slices and structs. go-validator/validator — This project is a data validation framework for the Go programming language that enforces integrity by applying… go-ozzo/ozzo-validation — ozzo-validation is a programmable data validation library for Go that verifies structs, maps, and primitive types… open-circle/valibot — Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments. hapijs/joi — Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It… typestack/class-validator — class-validator is a TypeScript class validation library that uses decorators to define constraints and rules for…