Add basic support for Poser reports, list/create

This commit is contained in:
Lance Edgar 2022-03-01 23:00:11 -06:00
parent a3195267c9
commit 72177aef0a
8 changed files with 512 additions and 4 deletions

View file

@ -674,10 +674,18 @@ class Form(object):
case the validator pertains to the form at large instead of
one of the fields.
TODO: what should the validator look like?
:param validator: Callable validator for the node.
"""
self.validators[key] = validator
# we normally apply the validator when creating the schema, so
# if this form already has a schema, then go ahead and apply
# the validator to it
if self.schema and key in self.schema:
self.schema[key].validator = validator
def set_required(self, key, required=True):
"""
Set whether or not value is required for a given field.