class MyForm(Form): a = SimpleTypeField(int) b = SimpleTypeField(int) c = SimpleTypeField(int) def _full_form_validation(self, root): if self.a < self.b: return ["a must be >= b"] return []
class MyInnerForm(Form): my_field = SimpleTypeField(int) my_other_field = SimpleTypeField(int)
class MyForm(Form): my_field = SimpleTypeField(int) my_other_field = SimpleTypeField(int, nullable=True)
class MyForm(Form): my_field = SimpleTypeField(int)
class MyForm(Form): a = SimpleTypeField(float) inner = MyInnerForm()
class MyInnerForm(Form): b = SimpleTypeField(str) c = SimpleTypeField(int, default=42, nullable=True)
class InnerTwo(Form): b = SimpleTypeField(int, validation_priority=5) def _full_form_validation(self, root): assert isinstance(root.one.a, str) return []
class InnerOne(Form): a = SimpleTypeField(int) def _full_form_validation(self, root): assert isinstance(root.two.b, int) return []
class MyForm(Form): my_int_field = SimpleTypeField(int) my_float_field = SimpleTypeField(float)
class MyInnerForm(Form): my_field = SimpleTypeField(int, display="Cheesy Interior")
class MyInnerForm(Form): my_field = SimpleTypeField(int) foo = SimpleTypeField(str)
class MyForm(Form): my_field = SimpleTypeField(int, nullable=True) my_other_field = SimpleTypeField(int, nullable=True, default=float("inf"))