Complete Description of Issue
I want to have an optional validation. I'm using skip_if option when declaring property on a form. In the validation block I'm making it optional inside params so if the property is not passed to the validation, it would still validate successfully.
Steps to reproduce
Branch in my project: https://github.com/AndKiel/tournaments-api/tree/55eaf06f5e45e3969b0bc2720306d91e64aea6a3
Relevant files:
Test run focused on the form spec and contract spec (it still has focus on the form spec from the other issue): https://github.com/AndKiel/tournaments-api/pull/29/checks?check_run_id=735646841
Expected behavior
I'm expecting skipped property not to be passed to the validation at all. When using Dry::Validation::Contract and hash without a key is passed for the call it works as expected and validation passes. In Reform it's broken.
Actual behavior
Property key is still present and passed to validation with the value from validate() invocation despite the fact that property is declared with skip_if option.
System configuration
Reform version: v2.3.1 (latest)
dry-validation version: v1.5 (latest)
Complete Description of Issue
I want to have an optional validation. I'm using
skip_ifoption when declaringpropertyon a form. In thevalidationblock I'm making itoptionalinsideparamsso if the property is not passed to the validation, it would still validate successfully.Steps to reproduce
Branch in my project: https://github.com/AndKiel/tournaments-api/tree/55eaf06f5e45e3969b0bc2720306d91e64aea6a3
Relevant files:
Test run focused on the form spec and contract spec (it still has focus on the form spec from the other issue): https://github.com/AndKiel/tournaments-api/pull/29/checks?check_run_id=735646841
Expected behavior
I'm expecting skipped property not to be passed to the validation at all. When using
Dry::Validation::Contractand hash without a key is passed for thecallit works as expected and validation passes. InReformit's broken.Actual behavior
Property key is still present and passed to validation with the value from
validate()invocation despite the fact thatpropertyis declared withskip_ifoption.System configuration
Reform version: v2.3.1 (latest)
dry-validation version: v1.5 (latest)