How do I enable strict mode for Dry Form validation


#1

I would like to use Dry-Validation in a strict fashion. i.e. raise an error if the schema entry does not exist for a key.

Dry-Types with constructor: strict achieves that, but is there a way to enable this using Dry-Validation?


#2

No, the purpose of dry-validation is to validate data without raising exceptions, as invalid data are always expected. If you really want this, just wrap a schema in your own object, and raise an exception when there are errors.