WTForms v2.3.0 Release Notes
Release Date: 2020-04-21 // about 4 years ago-
๐ Released 2020-04-21
- ๐ Drop support for Python 2.6, 3.3, and 3.4.
- :class:
~fields.SelectField
useslist()
to construct a new list of choices. :pr:475
- Permitted underscores in
HostnameValidation
. :pr:463
- :class:
~validators.URL
validator now allows query parameters in the URL. :issue:523
, :pr:524
- โก๏ธ Updated
false_values
param inBooleanField
docs. :issue:483
, :pr:485
- ๐ Fixed broken format string in Arabic translation :pr:
471
- โก๏ธ Updated French and Japanese translations. :pr:
506, 514
- โก๏ธ Updated Ukrainian translation. :pr:
433
-
FieldList
error list keeps entries in order for easier identification of which fields had errors. :issue:257
, :pr:407
- :class:
~validators.Length
gives a more helpful error message whenmin
andmax
are the same value. :pr:266
- :class:
~fields.SelectField
no longer coercesNone
to"None"
allowing use of"None"
as an option. :issue:289
, :pr:288
- The :class:
~widgets.TextArea
widget prepends a\r\n
newline when rendering to account for browsers stripping an initial line for display. This does not affect the value. :issue:238
, :pr:395
- HTML5 :class:
~fields.html5.IntegerField
and :class:~fields.html5.RangeInput
don't render thestep="1"
attribute by default. :pr:343
-
aria_
args are rendered the same way asdata_
args, by converting underscores to hyphens.aria_describedby="name-help"
becomesaria-describedby="name-help"
. :issue:239
, :pr:389
- Added a
check_validators
method to :class:~fields.Field
which checks if the given validators are both callable, and not classes. :pr:298, 410
- โก๏ธ
form.errors
is not cached and will update if an error is appended to a field after access. :pr:568
- :class:
~wtforms.validators.NumberRange
correctly handle NaN values. :issue:505
, :pr:548
- :class:
~fields.IntegerField
checks input type when processing data. :pr:451
- Added a parameter to :class:
~fields.SelectField
to skip choice validation. :issue:434
, :pr:493
- Choices which name and data are the same do not need to use tuples.
:pr:
526
- ๐ Added more documentation on HTML5 fields. :pr:
326, 409
- HTML is escaped using MarkupSafe instead of the previous internal
implementation. :func:
~widgets.core.escape_html
is removed, replaced by :func:markupsafe.escape
. :class:~widgets.core.HTMLString
is removed, replaced by :class:markupsafe.Markup
. :pr:400
- ๐ Fixed broken IPv6 validator, validation now uses the
ipaddress
package. :issue:385
, :pr:403
- :class:
~fields.core.Label
text is escaped before rendering. :issue:315
, :pr:375
- Email validation is now handled by an optional library,
email_validator
. :pr:429