I need to validate a phone number using the PhoneNumber() validator
and I also need it to make certain that the phone number field is not
empty.  I am trying to create a compound validator like the following:

    class PhoneValidator(Schema):
        phone = PhoneNumber() and NotEmpty()

This gives the following message when a number is entered into the
Phone Number field:

    The input must be dict-like (not a <type 'unicode'>:
u'123-456-7890')

If the Phone Number field is empty then the following message is
generated:

    phone: Missing value

Can someone help me with this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to