# dry-rb/dry-validation

Validation library with type-safe schemas and rules

Repository: https://github.com/dry-rb/dry-validation
Canonical: https://ross.abutalabs.com/products/dry-validation
Homepage: https://dry-rb.org/gems/dry-validation
Language: Ruby
License: MIT
License Family: permissive
Topics: dry-rb, validation, ruby, data-validation, type-safety, coercion, rubygem, gem
Last push: 2026-05-10T05:19:56+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 81, release rhythm 40, longevity 100
- inputs: {"age_days": 4060, "days_push": 115, "days_rel": 589, "gap_med": 14, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1422, forks 195 (observed 2026-08-28T04:04:40.771337+00:00)

## What it is
dry-validation is a Ruby library for data validation using type-safe schemas and composable rules. It supports input coercion, nested data, custom predicates, and detailed error messages.

## Use cases
- validate request params in a ruby web app
- validate json payloads against a schema
- coerce and validate form input
- validate nested data structures in ruby
- add custom validation rules with error messages
- validate api input before processing

## When to choose
- you need type-safe, composable validation schemas in Ruby
- you want input coercion plus validation in one step
- you need detailed, localized error messages for invalid data

## When to avoid
- you only need simple presence checks and prefer minimal dependencies
- you are not working in Ruby
- you need database-level or ORM-integrated validation

## Facets
- artifact type: library
- maturity: active
- function: type-system, serialization, error-handling
- domain: web-development, backend, developer-tools
- platform: ruby, jvm
- tags: validation, data-validation, coercion, schemas, dry-rb, form-validation, params-validation

## Member repositories
- dry-rb/dry-validation (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:40.771337+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:37:41.480920+00:00, confidence not recorded.
  - readme: https://github.com/dry-rb/dry-validation (fetched 2026-08-28T04:04:40.771337+00:00, sha 840e7e660e0f)
  - homepage: https://dry-rb.org/gems/dry-validation (fetched 2026-08-29T11:49:55.528998+00:00, sha c5f6fd74885f)
  - site_page: https://hanakai.org/learn/dry/getting-started (fetched 2026-08-29T11:49:55.533150+00:00, sha a693676c58ea)
  - site_page: https://hanakai.org/learn/dry/dry-monads/v1.8/getting-started (fetched 2026-08-29T11:49:55.535534+00:00, sha 95b7ca4e4c18)
  - site_page: https://hanakai.org/learn/dry/dry-types/v1.8/getting-started (fetched 2026-08-29T11:49:55.539800+00:00, sha c77b09f7d113)
  - site_page: https://hanakai.org/learn/dry/dry-monitor/v1.0/third-party-integrations (fetched 2026-08-29T11:49:55.537885+00:00, sha f7810597f1fc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
