On Jul 8, 2:17 pm, "Rick Flosi" <[EMAIL PROTECTED]> wrote:
> Have you looked at the source code? I think there might be an example or at
> least more info in the doc string.
>
> I think you might need to define cc_type and cc_number in your validator
> schema as well.

I came up with the following, which seems to work. Does anyone know if
this is the "preferred" way to do this? Is there a better way?

cc_validator = CreditCardValidator('cc_type', 'cc_number')

class EnterInfoValidator(Schema):
    pre_validators = [cc_validator]
    first_name = String(not_empty=True)
    last_name = String(not_empty=True)
    cc_type = String(not_empty=True)
    cc_number = Int(not_empty=True)

-wlb

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to