Open grizzlydev opened 7 years ago
Cool, I finally understood the difference and what's a hint
, now!
@apotonick if you look back at the old code I put together for 2.3.1 I had a handle for this.
We have to be careful how we do it as if you run separate calls to dry-v's error messages object (say to get errors and hints separately) it'll build the errors twice.
Complete Description of Issue
Reform/ Dry integration takes the whole Dry::Validation::Result#messages (hints + errors), not just errors. Consequently hints are presented indistinguishable from actual errors. If you have two predicates which validate the same nature of an input (e.g. less than + greater than on an int) this leads to a bad user experience - users are told something is failing when it is not.
Steps to reproduce
Expected behavior
Tell us what should happen
Actual behavior
Tell us what happens instead
System configuration
Reform version:2.2.4
Full Backtrace of Exception (if any)
N/A