Richie Ward
2009-07-12 19:20:04 UTC
I was trying to do something like this for my validation:
chained_validators = [Any(NotEmpty('modulenamelist'), NotEmpty('modulename'))]
But NotEmpty does not support specifying the field names?
I am trying to make something like Field A or Field B must have some
valid input in it but both must not be empty. One can be empty if the
other has valid input.
I found the Any compound validator and this seemed to be what I need
but as you can see I hit a brick wall.
chained_validators = [Any(NotEmpty('modulenamelist'), NotEmpty('modulename'))]
But NotEmpty does not support specifying the field names?
I am trying to make something like Field A or Field B must have some
valid input in it but both must not be empty. One can be empty if the
other has valid input.
I found the Any compound validator and this seemed to be what I need
but as you can see I hit a brick wall.
--
Thanks, Richie Ward
Thanks, Richie Ward