To answer my own question, I created an AutoCompleteFormValidator using
the same method as the AutoCompleteValidator above:

class MyValidator(v.FormValidator)
def _to_python(self,value_dict,state):
                # shipping_country required if shipping_use_billing is missing
                if not value_dict.get ( 'cb' ):
                        text=value_dict['field2']['text']
                        if text is None or text=='':
                                raise validators.Invalid ( 'Please enter a 
value',
                                        value_dict, state, 
error_dict={'field2':'Please enter a value'} )
                return value_dict

This can be used in place of the RequireIfMissing validator on the form
schema's chained_validators


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to