awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com

Data validation constraints

Ranking updated Aug 2, 2026

For field population constraints, the strongest matches are mongoengine/mongoengine (MongoEngine is an object-document mapper for Python that provides), sqlalchemy/sqlalchemy (SQLAlchemy is a comprehensive Python object-relational mapper and SQL) and typeorm/typeorm (TypeORM is an object-relational mapper for TypeScript and JavaScript). mongodb/mongoid and fastapi/sqlmodel round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

Compare the best open-source field validation and data constraint libraries for GitHub. Find the right one for your tech stack and pick it today.

Data validation constraints

Find the best repos with AI.We'll search the best matching repositories with AI.
  • mongoengine/mongoengineMongoEngine avatar

    MongoEngine/mongoengine

    4,349View on GitHub↗

    MongoEngine is a Python object-document mapper that translates database records into objects to provide an object-oriented interface for data persistence. It serves as a document manager and schema validator for MongoDB, mapping classes to documents to enforce data types and validation rules. The project provides a lazy-loaded queryset system for filtering, sorting, and aggregating collections using Pythonic syntax. It manages complex data structures through features such as document inheritance, recursive embedded document handling, and reference-based object linking. The library covers bro

    MongoEngine is an object-document mapper for Python that provides schema validation and reference-based object linking for MongoDB, fitting well within the requested database modeling and validation tool category.

    PythonData ValidationObject-Document MappersODM Frameworks
    View on GitHub↗4,349
  • sqlalchemy/sqlalchemysqlalchemy avatar

    sqlalchemy/sqlalchemy

    11,612View on GitHub↗

    SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for interacting with relational databases. It serves as a foundational layer for database connectivity, offering both a high-level object-oriented interface for data persistence and a programmatic SQL expression language for constructing complex, dialect-agnostic queries. The project distinguishes itself through its sophisticated unit of work persistence, which coordinates atomic transactions and tracks object state changes to minimize redundant database operations. It provides a

    SQLAlchemy is a comprehensive Python object-relational mapper and SQL toolkit that provides schema definition, constraint enforcement, and object mapping, perfectly fitting the database modeling and query requirements.

    PythonDatabase Schema ConstraintsDatabase Relationship MappingsRelation Loading Strategies
    View on GitHub↗11,612
  • typeorm/typeormtypeorm avatar

    typeorm/typeorm

    36,540View on GitHub↗

    TypeORM is an object-relational mapper for TypeScript and JavaScript that bridges the gap between object-oriented application code and relational database tables. It provides a comprehensive data persistence layer that allows developers to define database entities using class decorators or configuration objects, enabling seamless interaction with data through object-oriented patterns. The project distinguishes itself through a flexible architecture that supports both the data mapper and repository patterns, alongside a fluent query builder that translates high-level method calls into platform

    TypeORM is an object-relational mapper for TypeScript and JavaScript that provides schema definition, constraint management, database migration tools, and robust TypeScript support for relational data.

    TypeScriptObject-Document MappersSchema ConstraintsRelation Loading Strategies
    View on GitHub↗36,540
  • mongodb/mongoidmongodb avatar

    mongodb/mongoid

    3,917View on GitHub↗

    Mongoid is an object-document mapper for Ruby that translates Ruby objects into MongoDB documents. It serves as a document database mapper and client library, providing a structured way to manage data persistence and retrieval within a NoSQL environment. The project distinguishes itself by offering advanced data retrieval tools, including vector search for semantic similarity and full-text search for keyword matching. It implements high-security data protection through client-side field-level encryption, encryption key rotation, and TLS connection security to protect sensitive information. B

    Mongoid is a Ruby object-document mapper that provides schema-like validation, associations, and constraint enforcement for MongoDB documents, though it lacks TypeScript support.

    RubyObject-Document MappersODM Frameworks
    View on GitHub↗3,917
  • fastapi/sqlmodelfastapi avatar

    fastapi/sqlmodel

    18,137View on GitHub↗

    SQLModel is a type-safe object-relational mapping library for Python that integrates database schema definitions with data validation logic. By combining these two roles into a single class, it allows developers to manage relational data structures and enforce data integrity for web APIs simultaneously. The framework is built to support asynchronous database operations, enabling high-performance applications to execute queries and transactions without blocking the main execution thread. The library distinguishes itself by leveraging Python type hints to provide IDE autocompletion and compile-

    SQLModel is a type-safe object-relational mapping library for Python that integrates schema definition and data validation using type hints, fitting the requested database modeling and validation needs despite being tailored for Python and FastAPI rather than TypeScript.

    PythonData ValidationData Schema DefinitionsDatabase Relationship Mappings
    View on GitHub↗18,137
  • ent/entent avatar

    ent/ent

    17,110View on GitHub↗

    Ent is a statically typed entity framework for Go that models database structures as a graph of nodes and edges. It functions as a code generation engine that transforms schema definitions into type-safe database clients, query builders, and migration scripts. By representing data as interconnected entities, the framework enables intuitive traversal of complex relationships and ensures that database interactions remain consistent with the application model at compile time. The framework distinguishes itself through its graph-based approach to data modeling and its reliance on compile-time cod

    Ent is a statically typed entity framework for Go that provides robust schema definition, type-safe query building, and graph-based relationship management that fits the schema validation and database modeling criteria.

    GoDatabase Schema Constraints
    View on GitHub↗17,110
  • mikro-orm/mikro-ormmikro-orm avatar

    mikro-orm/mikro-orm

    9,085View on GitHub↗

    Mikro-ORM is a TypeScript-based object-relational mapping system that provides a unified persistence layer for Node.js applications. It translates TypeScript entities into relational or document-based database schemas, supporting a variety of engines including PostgreSQL, MySQL, MariaDB, MS SQL Server, SQLite, and MongoDB. The project implements the data mapper pattern to decouple in-memory domain models from the database persistence layer. It utilizes a unit of work pattern to track entity changes in memory and commit them in a single coordinated database transaction. The library covers com

    Mikro-ORM is a comprehensive TypeScript ORM and schema management system that handles schema validation, data seeding, constraints, and entity population out of the box.

    TypeScriptDatabase Schema Constraints
    View on GitHub↗9,085
  • dotnet/efcoredotnet avatar

    dotnet/efcore

    14,587View on GitHub↗

    Entity Framework Core is an object-relational mapper that enables developers to interact with database systems using strongly-typed code. It serves as a comprehensive data access framework, providing a unified interface for mapping application objects to relational and non-relational database schemas while managing the lifecycle of data operations through a central context. The project distinguishes itself through a provider-based architecture that decouples core data access logic from specific database engines, allowing for consistent interaction across diverse storage systems. It features a

    Entity Framework Core is a powerful object-relational mapper that provides robust schema definition, constraint enforcement, and data population capabilities with full TypeScript-adjacent strong typing in C#.

    C#Database Relationship MappingsRelation Loading Strategies
    View on GitHub↗14,587
  • ianstormtaylor/superstructianstormtaylor avatar

    ianstormtaylor/superstruct

    7,141View on GitHub↗

    Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined shapes and types. It functions as a composable schema builder and a TypeScript schema validator, ensuring that runtime data checks remain synchronized with static type definitions. The library features a data coercion engine that transforms input values or injects default values before the validation process is executed. It enables the creation of complex validation rules by nesting, merging, or omitting properties from existing structures. Its capabilities cover the validatio

    Superstruct is a TypeScript validation library that verifies data structures against defined schemas, fulfilling the validation and type inference requirements while operating as a standalone library rather than an ORM database tool.

    TypeScriptSchema Type InferenceData Schema Definitions
    View on GitHub↗7,141
  • elixir-ecto/ectoelixir-ecto avatar

    elixir-ecto/ecto

    6,471View on GitHub↗

    Ecto is an Elixir database toolkit that maps database rows to Elixir structs and validates data changes through changesets before persistence. It provides a language-integrated query syntax for composing database queries, building them incrementally and securely with compile-time expansion into safe SQL. The toolkit connects to multiple database backends including PostgreSQL, MySQL, MSSQL, SQLite3, ClickHouse, and ETS through a pluggable adapter interface. It supports eager and lazy preloading of associated records to eliminate N+1 query problems, and can store nested data structures as embed

    Ecto is an Elixir database toolkit and mapper that provides schema definition, robust data validation via changesets, query composition, and record preloading, making it a strong fit for the Elixir ecosystem despite lacking TypeScript support.

    ElixirData ValidationDatabase Schema Definitions
    View on GitHub↗6,471
  • marshmallow-code/marshmallowmarshmallow-code avatar

    marshmallow-code/marshmallow

    7,239View on GitHub↗

    Marshmallow is a Python data serialization library and validation framework. It functions as a bridge that transforms complex application objects into primitive data types for storage or network transmission and vice versa. The library utilizes a schema-based approach to validate that incoming data conforms to specific types and constraints. It employs a two-way transformation pipeline consisting of separate load and dump phases to handle deserialization and serialization. The framework supports class-based schema definitions with declarative field validation and recursive schema nesting for

    Marshmallow is a Python schema-based data validation and serialization framework that enforces field constraints and handles deserialization, though it focuses on transformation rather than full ORM database queries.

    PythonData Validation
    View on GitHub↗7,239
  • go-gorm/gormgo-gorm avatar

    go-gorm/gorm

    39,798View on GitHub↗

    GORM is a developer-focused object-relational mapping library for Go that provides a comprehensive data persistence framework. It serves as a database access layer, allowing developers to map application structures to database tables and perform CRUD operations using a fluent, type-safe query builder instead of writing raw SQL. The library distinguishes itself through its association-aware persistence, which automatically tracks and synchronizes complex entity relationships during database operations. It utilizes a driver-agnostic interface to maintain consistent behavior across various stora

    GORM is an object-relational mapping library for Go that provides database modeling, schema migration, constraint handling, and association-aware data population.

    GoDatabase TransactionsObject-Relational MappersObject-Relational Mapping
    View on GitHub↗39,798
  • prisma/prismaprisma avatar

    prisma/prisma

    46,366View on GitHub↗

    Prisma is a database toolkit that provides a unified access layer for interacting with relational and document databases. It centers on a declarative schema modeling approach, where developers define their data structures in a human-readable language. This schema serves as the single source of truth, from which the toolkit automatically generates type-safe database clients that provide compile-time validation and editor autocomplete for all data operations. The project distinguishes itself through a high-performance, Rust-based query engine that handles query planning and connection pooling o

    Prisma is a TypeScript-based ORM and database toolkit that provides declarative schema modeling, compile-time type safety, and strict constraint validation for safe data queries and creation.

    TypeScriptObject-Relational MappersSchema Modeling ToolsType-Safe Client Generators
    View on GitHub↗46,366
  • typestack/class-validatortypestack avatar

    typestack/class-validator

    11,796View on GitHub↗

    class-validator is a TypeScript class validation library that uses decorators to define constraints and rules for object properties. It functions as a decorator-based schema validator that ensures data integrity and structural correctness through a combination of synchronous checks and promise-based asynchronous rules. The library provides a recursive validation system for checking complex data hierarchies, including nested classes and individual elements within collections. It includes an object property whitelist utility capable of stripping undocumented properties or blocking unknown field

    This is a decorator-based TypeScript validation library that enforces constraints and structural rules on object properties, though it focuses strictly on validation rather than full database schema management or query population.

    TypeScriptData Validation
    View on GitHub↗11,796
  • stephenafamo/bobstephenafamo avatar

    stephenafamo/bob

    1,739View on GitHub↗

    This project is a database toolkit for Go that provides schema-to-object mapping, fluent query construction, and automated code generation. It functions as a framework for type-safe database access, enabling developers to interact with relational databases by generating models and interfaces directly from existing database schemas. The toolkit distinguishes itself through a workflow that parses hand-written SQL files to generate type-safe functions, allowing for the integration of custom SQL while maintaining consistent result mapping. It supports modular customization through a plugin-based

    This project is a Go database toolkit and code generator that handles schema-to-object mapping and type-safe query construction, fulfilling the database modeling and query requirements although it targets Go rather than TypeScript.

    GoDatabase Relationship MappingsORM Relationship Querying
    View on GitHub↗1,739
  • pydantic/pydanticpydantic avatar

    pydantic/pydantic

    26,932View on GitHub↗

    Pydantic is a data validation and serialization library that enforces schema constraints and performs type conversion on complex data structures. It utilizes standard Python type annotations to define data models, allowing developers to establish structured schemas that automatically enforce business rules and constraints without the need for custom domain-specific languages. The library distinguishes itself by transforming high-level model definitions into optimized code during initialization to minimize runtime overhead. It supports recursive validation for nested data structures and employ

    Pydantic is a Python data validation and serialization library that enforces schema constraints using type annotations, making it a powerful tool for schema definition despite lacking built-in ORM query execution.

    PythonType-Hint-Based Schema Definitions
    View on GitHub↗26,932
  • diesel-rs/dieseldiesel-rs avatar

    diesel-rs/diesel

    14,021View on GitHub↗

    This project is a type-safe database toolkit and object-relational mapper designed to enforce structural consistency between database schemas and application code. By leveraging compile-time validation, it ensures that SQL queries and data structures remain synchronized, preventing common errors before the application executes. It provides a comprehensive framework for relational data modeling, allowing developers to define table associations and map database results directly into strongly-typed language objects. The library distinguishes itself through its focus on compile-time safety and au

    Diesel is a type-safe ORM and query builder for Rust that enforces database schema consistency and constraints at compile time, matching your need for a strict data modeling and query toolkit despite lacking TypeScript support.

    RustDatabase Relationship MappingsDatabase Schema Definitions
    View on GitHub↗14,021
  • hapijs/joihapijs avatar

    hapijs/joi

    21,192View on GitHub↗

    Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It functions as an object schema validator and parser, ensuring that input data matches specific types and formats before it is processed by an application. The library features a conditional validation engine capable of dynamic schema enforcement, where validation logic and dependencies change based on the values of other keys within an object. It also serves as a data casting and sanitization tool, transforming input values into target types and removing sensitive keys from the

    Joi is a JavaScript schema validation and data sanitization library that enforces structural constraints on objects, though it focuses on general input validation rather than direct database ORM integration.

    JavaScriptData Validation
    View on GitHub↗21,192
  • sequelize/sequelizesequelize avatar

    sequelize/sequelize

    30,349View on GitHub↗

    Sequelize is an object-relational mapping library that provides a unified interface for managing relational data through code. By implementing the Active Record pattern, it maps database tables to application objects, allowing developers to perform standard create, read, update, and delete operations using high-level method calls. The library abstracts complex database interactions by translating these calls into optimized, engine-specific SQL statements, ensuring consistent behavior across different database systems. The project distinguishes itself through a comprehensive suite of tools for

    Sequelize is an object-relational mapping library written in TypeScript that supports schema definition, constraint enforcement, and relation management for relational databases, though it leans more toward full ORM capabilities than dedicated schema validation alone.

    TypeScriptData Validation
    View on GitHub↗30,349
  • jquense/yupjquense avatar

    jquense/yup

    23,673View on GitHub↗

    Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as an object schema validator and a data coercion engine, allowing developers to transform raw input values into desired types before performing validation checks. The library is distinguished by its support for dynamic schema validation, where rules can be adjusted at runtime based on sibling field values or external context. It also enables recursive data structuring for polymorphic fields and provides a system for extracting static TypeScript interfaces from runtime schema def

    Yup is a TypeScript-powered schema validation and data coercion library that enforces runtime data shapes and types, fitting well for input validation though lacking direct ORM database querying capabilities.

    TypeScriptTypeScript Type Definitions
    View on GitHub↗23,673
  • tonsky/datascripttonsky avatar

    tonsky/datascript

    5,767View on GitHub↗

    Datascript is an immutable, in-memory state store and schema-based triple store. It manages application state as a versioned database, storing data as immutable facts consisting of an entity, attribute, value, and transaction. The project provides a logic engine for executing Datalog queries with support for implicit joins, recursive rules, and negation. It also features a declarative pull API for retrieving deeply nested entity graphs and related data structures. The database enforces data integrity through schema-driven constraints and attribute types. It supports atomic transactions, plug

    DataScript is an in-memory database and schema-based state store that enforces schema-driven validation and supports declarative graph queries, though it is built for Clojure rather than TypeScript or standard ORM/ODM workflows.

    ClojureDatabase Schema Constraints
    View on GitHub↗5,767
  • payloadcms/payloadpayloadcms avatar

    payloadcms/payload

    43,053View on GitHub↗

    Payload is a headless content management system and application framework that uses a code-first approach to define data schemas and administrative interfaces. By utilizing a centralized, type-safe configuration object, it automatically generates database schemas, API endpoints, and a fully customizable admin panel. The system is built on a database-agnostic architecture, allowing it to interface with various storage engines while providing a unified, type-safe API for server-side operations, REST, and GraphQL. What distinguishes Payload is its deep extensibility and developer-centric design.

    Payload is a full-featured headless CMS and application framework rather than a standalone schema validator, but its code-first TypeScript configuration inherently provides schema definition, type safety, and database modeling out of the box.

    TypeScriptData ConstraintsQuery PopulationData Schema Definitions
    View on GitHub↗43,053
  • drizzle-team/drizzle-ormdrizzle-team avatar

    drizzle-team/drizzle-orm

    34,835View on GitHub↗

    Drizzle ORM is a TypeScript-native database toolkit providing type-safe SQL query building, schema management, and automated migrations across PostgreSQL, MySQL, SQLite, and SingleStore.

    Drizzle ORM is a TypeScript-native database toolkit that provides schema definition, type safety, and query building, fitting the tool category well despite functioning primarily as an ORM rather than a standalone validator.

    TypeScriptReferential Integrity Constraints
    View on GitHub↗34,835
  • arktypeio/arktypearktypeio avatar

    arktypeio/arktype

    7,780View on GitHub↗

    Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution. The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida

    ArkType is a TypeScript runtime validation library that synchronizes static types with runtime data validation, providing type-safe schemas and constraint enforcement during execution.

    TypeScriptData Schema Definitions
    View on GitHub↗7,780
  • tortoise/tortoise-ormtortoise avatar

    tortoise/tortoise-orm

    5,582View on GitHub↗

    Tortoise ORM is an asynchronous object-relational mapper for Python that mirrors Django's model and queryset API while running on asyncio. It defines database tables as Python classes with typed fields and supports foreign key, many-to-many, and one-to-one relations, providing a chainable query API for filtering, annotating, grouping, and prefetching related objects without blocking the event loop. The ORM includes a built-in migration engine that detects model changes, generates migration files, and applies or reverts schema changes through a command-line tool. It connects to PostgreSQL, MyS

    Tortoise ORM is an asynchronous Python object-relational mapper that mirrors Django's API to handle database modeling, migrations, and typed querying, though it lacks TypeScript support since it targets Python.

    PythonAsync-Await ORM CoresAsyncAsync Python ORMs with Relations
    View on GitHub↗5,582
  • pyeve/evepyeve avatar

    pyeve/eve

    6,738View on GitHub↗

    Eve is a REST API framework that maps database collections to web resources through declarative configuration files. It functions as a database-to-API mapper, automatically exposing data as RESTful endpoints with built-in support for CRUD operations and schema-based request validation. The project distinguishes itself through a HATEOAS API engine that generates hypermedia links and resource schemas for dynamic client discovery. It also includes an automated Swagger documentation generator that produces interactive specifications for client SDK generation and testing. The framework provides a

    Eve is a REST API framework that maps database collections to web resources and provides schema-based request validation and automated documentation, though it is written in Python rather than TypeScript.

    PythonDatabase-to-REST InterfacesDynamic REST API GeneratorsREST API Frameworks
    View on GitHub↗6,738
  • msgspec/msgspecmsgspec avatar

    msgspec/msgspec

    3,821View on GitHub↗

    msgspec is a high-performance data modeling, serialization, and schema validation toolkit for Python. It serves as a type-safe serialization framework that integrates schema enforcement and data parsing into a single pass, functioning as both a data serialization library and a schema validation system based on standard Python type annotations. The project distinguishes itself through high-performance structural primitives, including compilation-based routine generation and zero-copy buffer parsing. It optimizes memory usage via garbage collection-aware layouts and reduces processing overhead

    msgspec provides high-performance schema validation, data modeling, and type-safe serialization for Python, matching the core intent for structural validation even though it operates as a serialization library rather than a traditional ORM query database tool.

    PythonHigh-Performance Binary SerializationMulti-Format SerializersBinary Data Processing
    View on GitHub↗3,821
  • guidocella/eloquent-populatorguidocella avatar

    guidocella/eloquent-populator

    76View on GitHub↗

    This package provides default attributes for Laravel model factories by guessing the best Faker formatters from columns' names and types. For example, if a column is called first_name, it will use $faker->firstName(). If unable to guess by the column's name, it will guess the formatter by the…

    This package populates Laravel models with dummy data using Faker based on column names and types, fulfilling the data population aspect of your search.

    PHPDatabase and ORM
    View on GitHub↗76
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
mongoengine/mongoengine4.3KPythonMITMar 10, 2026
sqlalchemy/sqlalchemy11.6KPythonmitFeb 19, 2026
typeorm/typeorm36.5KTypeScriptMITJun 15, 2026
mongodb/mongoid3.9KRubyMITJun 15, 2026
fastapi/sqlmodel18.1KPythonMITJun 21, 2026
ent/ent17.1KGoApache-2.0May 31, 2026
mikro-orm/mikro-orm9.1KTypeScriptMITJun 17, 2026
dotnet/efcore14.6KC#mitFeb 20, 2026
ianstormtaylor/superstruct7.1KTypeScriptMITOct 1, 2024
elixir-ecto/ecto6.5KElixirApache-2.0Jun 19, 2026

Related searches

  • Type constraints
  • Concurrency control libraries
  • Memoization constraints
  • Syntax validator
  • Text search engine
  • a data validation library for application development
  • Template condition validator
  • a schema validation library for data parsing