The password validator works on its own and the MyTextValidator works
on its own as well.
Apparently there's some magic in the word 'chained_validators' because
if I change it from that word, the validator simply ignores it. When I
comment out one of the chained_validators and changed the other one to
'chained_validators', it worked. I'm aware that what I just said is
poorly worded, so this is what I mean:
class UserAddSchema(validators.Schema):
password = validators.String(not_empty=True)
passwordConfirm = validators.String(not_empty=True)
#chained_validators = [validators.FieldsMatch('passwordConfirm',
'password')]
mytext= validators.String(not_empty=True)
mytextConfirm= validators.String(not_empty=True)
chained_validators = [MyTextValidator('mytext', 'mytextConfirm')]
Does anyone know how to make 2 chained_validators in one schema?
Thanks in advance,
Frank
chained_validators = [validators.FieldsMatch('passwordConfirm',
'password'), MyTextValidator('mytext', 'mytextConfirm')]