Well, the card_num schema node is going to be a child, most likely, of a
mapping schema node.  You could put the validator there.

Chris


On Thu, Apr 18, 2013 at 7:53 PM, Vincent Catalano <
[email protected]> wrote:

> Hello Pyramid community,
>
> I was wondering if any of you have used Colander and could help me out
> with a validation question. I want to validate a credit card schema:
>
> {'card_num': 'xxxxxxxxxx', 'exp_month': 12, 'exp_year': 2013}
>
> The problem is that the validation for the expiration month will change
> depending on the year. Is there  any way to pass in other nodes to the give
> nodes 'validation' method? OR is it possible (or a good practice) to throw
> a colander exception in an 'after_bind' method?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to