Closed bsoyka closed 4 years ago
This same
rules means something else. check()
takes argument that represents other field name in the same dictionary :
Example:
req = {"old_pass": "secret", "new_pass": "secret"}
rule = {"new_pass": "same:old_pass"}
validate(req, rule) # True
req = {"old_pass": "old_secret", "new_pass": "new_secret"}
rule = {"new_pass": "same:old_pass"}
validate(req, rule) # False
TBH, I don't know why I assigned this as good first issue label. It makes us change interfaces with validator <-> rules.
I think Issue needs more explanation and removal of good first issue label. Sorry for your time :) Take a look at other Issues if you want to. I'll be closing this now.
Closes #61.