Merge pull request #710 from bautrey37/hints-docs

Add hints extension to docs
This commit is contained in:
Peter Solnica 2022-05-11 08:22:25 +02:00 committed by GitHub
commit b56801c635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
```