Kirk Strauser schrieb:
> On Thursday 16 October 2008 12:42:03 Christopher Arndt wrote:
>
>> AutoCompletField is a CompoundWidget and therefor needs a validation
>> schema, not a single validator.
>>
>> The meber widgets are "text_field" and "hidden_field".
>
> OK, I'm giving up and asking to be spoon fed. How exactly would I add that
> to
> my pre-existing validation schema:
>
> class UserInfoSchema(validators.Schema):
> chained_validators = [
> validators.FieldsMatch('password', 'passwordverify'),
> ]
>
> Is this stuff documented anywhere? The only vaguely relevant Google hits
> were
> to http://docs.turbogears.org/1.0/FormValidationWithSchemas#compound-
> validators but that's something else entirely.
You write your own schema for the field itself, ACSchema, with the two
fields.
class ACSchema(Schema):
text_field = AValidator()
hidden_field = AValidator()
AutoCompletField(validator=ACSchema())
You can of course add that to your above schema as well.
That is what I *think* should be it. You need to remember that
validators can be hierarchic, by means of schemas, and Schemas are
validators themselves.
Diez
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---