class MyForm(Form):
field1 = DecimalField('Сумма1', validators=[DataRequired()])
field2 = DecimalField('Cумма2', validators=[DataRequired()])
class MyForm(Form):
field1 = DecimalField('Сумма1')
field2 = DecimalField('Cумма2')
def validate(self):
if not Form.validate(self):
return False
if field1.data:
if field2.data:
return True
return False