Validator icon indicating copy to clipboard operation
Validator copied to clipboard

Error message issue on Min rule

Open karolyjozsa opened this issue 3 years ago • 0 comments

Bug Description:

>>> validate({"d":-2}, {"d":[rules.Integer(), rules.Min(1)]}, return_info=True)
(False, {}, {'d': {'Min': 'Expected Maximum: 1, Got: -2'}})

The validation correctly fails, also the error message correctly indicates that the "Min" rule where it failed, but the text incorrectly states "Maximum".

Expected Behavior: 'Expected Minimum: 1, Got: -2' I guess the issue lies in using the Size rule and the error message with this "Maximum" comes from there.

karolyjozsa avatar Jul 05 '22 01:07 karolyjozsa