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:
parent
86fdf05f7d
commit
4124c242b5
|
@ -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)
|
||||
```
|
Loading…
Reference in New Issue