featurehelp wanted
Metriche repository
- Star
- (1421 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
In order to make defining rules that depend on additional conditions nicer, we can have something like this:
params do
optional(:per_page).value(:integer)
end
rule(:per_page).if(:key?).validate(gt?: 0, lteq?: 20)
See the original conversation: https://github.com/dry-rb/dry-validation/issues/540#issuecomment-744022950