Skip to content

Commit

Permalink
Merge pull request #710 from bautrey37/hints-docs
Browse files Browse the repository at this point in the history
Add hints extension to docs
  • Loading branch information
solnic committed May 11, 2022
2 parents 86fdf05 + 4124c24 commit b56801c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docsite/source/extensions.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

0 comments on commit b56801c

Please sign in to comment.