Changes pending approval

0
 
0
dry-validation - Tagline
Diff:
  • Data validation library based on predicate logic and rule composition
  • Validation library with type-safe schemas and rules
Suggested by solnic
0
 
0
dry-validation - Description
Diff:
  • Unlike other, well known, validation solutions in Ruby, dry-validation takes a different approach and focuses a lot on explicitness, clarity and precision of validation logic. It is designed to work with any data input, whether it’s a simple hash, an array or a complex object with deeply nested data.
  • dry-validation is a data validation library that provides a powerful DSL for defining schemas and validation rules.
  • It is based on the idea that each validation is encapsulated by a simple, stateless, predicate that receives some input and returns either true or false. Those predicates are encapsulated by rules which can be composed together using predicate logic. This means you can use the common logic operators to build up a validation schema.
  • Validations are expressed through contract objects. A contract specifies a schema with basic type checks and any additional rules that should be applied. Contract rules are applied only once the values they rely on have been succesfully verified by the schema.
  • Unique features
  • There are a couple of unique features that make dry-validation stand out from the crowd:
  • Strict, explicit data schemas are separated from the domain validation logic - this allows you define validation rules that are type safe and focus exclusively on validation logic. This in turn makes rule code much simpler and easier to understand
  • Schemas are powered by dry-schema which sanitizes, coerces and type-checks the input for you
  • Contracts support defining macros, which can significantly reduce code duplication in your rules
  • Plays nice with dependency injection, using either option API or automated approach via dry-auto_inject
Suggested by solnic
0
 
0
dry-validation - Tag names
Diff:
  • Activerecord, Data Validation, ORM/ODM Extensions, Validation, Validations
  • Activerecord, Coercion, Data Validation, ORM/ODM Extensions, Type Safety, Validation, Validations
Suggested by solnic