Add hints extension to docs

The extension got moved to dry-schema but it is still needed in
dry-validation to enable hints for contracts.
This commit is contained in:
Brandon Autrey 2022-05-10 12:29:39 +03:00
parent 86fdf05f7d
commit 4124c242b5
1 changed files with 12 additions and 0 deletions

View File

@ -59,3 +59,15 @@ end
AgeContract.new.(age: 17).errors.first.text
# => 'must be greater than or equal to 18'
```
### Hints
The hints extension is implemented in [dry-schema](https://dry-rb.org/gems/dry-schema/main/extensions/hints/). This extension enables hints in Contracts.
To enable the extension:
```ruby
require 'dry/validation'
Dry::Validation.load_extensions(:hints)
```