On Fri, Jan 1, 2010 at 8:55 AM, gazza <[email protected]> wrote:
> Hello,
>
> I'm having a wee' issue on this problem of introducing the credit card
> checks.
>
> Below is my verification class:
>
> class ClientNewForm(formencode.Schema):
>         allow_extra_fields = True
>         filter_extra_fields = True
>         firstname = formencode.validators.String(not_empty=True)
>         lastname = formencode.validators.String(not_empty=True)
>         cardType = formencode.validators.String(not_empty=True)
>         cardNumber = formencode.validators.String(not_empty=True)
>
>         ccType=cardType
>         ccNumber=cardNumber
>         cc = formencode.validators.CreditCardValidator()
>
> Essentially this results in three missing fields being show i.e
> ccType,ccNumber and cc.
>
> Could somebody be so kind and enlighten me on the correct syntax for
> this method?

Oh, they need to be post_validators because they operate on multiple
fields.  So make string fields for all of them, then put the credit
card validators in post_validators.

-- 
Mike Orr <[email protected]>

--

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