WTForms: IntegerField skips coercion when string value is '0'
问题 This question almost covers what I am after here, but not quite. It seems like IntegerField skips coercion when the string value is '0'. Any other positive integer seems to work okay. Here is an example of '0': from wtforms import validators, Form, IntegerField from webob.multidict import MultiDict class TestForm(Form): num = IntegerField('How Many?', [validators.DataRequired('num required.'), validators.NumberRange(min=0, max=100)]) data_in = {'num': '0'} # Note '0' is a string as would be