New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve Email validator #294

Merged
merged 1 commit into from Nov 12, 2017

Conversation

4 participants
@alanhamlett
Contributor

alanhamlett commented Aug 27, 2016

Uses the same user_part regex from Django.

Related to #172, #169, and #117.

The new tests added here previously would fail, now they pass.

@alanhamlett

This comment has been minimized.

Contributor

alanhamlett commented Dec 10, 2016

Want to bring this up again and see if it could get reviewed and hopefully merged?

@alanhamlett alanhamlett force-pushed the alanhamlett:master branch from 9d5d7f6 to 2a24d30 Dec 10, 2016

@illume

This comment has been minimized.

illume commented Mar 12, 2017

This is a good test case to add as well: "b@example.com, b@example.com"
I've seen that one fall through quite a few validators. Pretty sure you patch catches it though :)

@alanhamlett

This comment has been minimized.

Contributor

alanhamlett commented Apr 29, 2017

@crast could we get this merged?

@kblomqvist

This comment has been minimized.

kblomqvist commented Apr 29, 2017

Also related to #336?

@alanhamlett

This comment has been minimized.

Contributor

alanhamlett commented Apr 29, 2017

@kblomqvist yes, this PR would fix #336 also.

@wtforms wtforms deleted a comment from asyncee Oct 26, 2017

@davidism davidism merged commit aca7de1 into wtforms:master Nov 12, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.08%) to 99.777%
Details

@davidism davidism referenced this pull request Nov 12, 2017

Closed

Wrong Email validation #336

@alanhamlett

This comment has been minimized.

Contributor

alanhamlett commented Nov 13, 2017

Thanks!

@davidism

This comment has been minimized.

Member

davidism commented Nov 13, 2017

Note that this won't get a release until I get access to PyPI and Read The Docs from @crast.

@alanhamlett

This comment has been minimized.

Contributor

alanhamlett commented Nov 13, 2017

It's just nice to not have to worry about rebasing now, in case another PR causes a merge conflict.

ftm pushed a commit to ftm/wtforms that referenced this pull request May 10, 2018

@abulte abulte referenced this pull request Jun 4, 2018

Merged

Update wtforms to 2.2 #1713

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Nov 12, 2018

py-wtforms: Update to 2.2.1.
Version 2.2.1
-------------

Released on June 7th, 2018

-   :class:`~fields.StringField` only sets ``data = ''`` when form data
    is empty and an initial value was not provided. This fixes an issue
    where the default value wasn't rendered with the initial form.
    (`#291`_, `#401`_)

.. _#291: wtforms/wtforms#291
.. _#401: wtforms/wtforms#401


Version 2.2
-----------

Released on June 2nd, 2018

-   Merged new and updated translations from the community.
-   Passing ``data_`` args to render a field converts all the
    underscores to hyphens when rendering the HTML attribute, not just
    the first one. ``data_foo_bar`` becomes ``data-foo-bar``. (`#248`_)
-   The :class:`~validators.UUID` validator uses the :class:`uuid.UUID`
    class instead of a regex. (`#251`_)
-   :class:`~fields.SelectField` copies the list of ``choices`` passed
    to it so modifying an instance's choices will not modify the global
    form definition. (`#286`_)
-   Fields call :meth:`~fields.Field.process_formdata` even if the raw
    data is empty. (`#280`_)
-   Added a :class:`~fields.MultipleFileField` to handle a multi-file
    input. :class:`~fields.FileField` continues to handle only one
    value. The underlying :class:`~widgets.FileInput` widget gained a
    ``multiple`` argument. (`#281`_)
-   :class:`~fields.SelectField` choices can contain HTML (MarkupSafe
    ``Markup`` object or equivalent API) and will be rendered properly.
    (`#302`_)
-   :class:`~fields.TimeField` and
    :class:`html5.TimeField <fields.html5.TimeField>` were added.
    (`#254`_)
-   Improved :class:`~validators.Email`. Note that it is still
    unreasonable to validate all emails with a regex and you should
    prefer validating by actually sending an email. (`#294`_)
-   Widgets render the ``required`` attribute when using a validator
    that provides the ``'required'`` flag, such as
    :class:`~validators.DataRequired`. (`#361`_)
-   Fix a compatibility issue with SQLAlchemy 2.1 that caused
    :class:`~ext.sqlalchemy.fields.QuerySelectField` to fail with
    ``ValueError: too many values to unpack``. (`#391`_)

.. _#248: wtforms/wtforms#248
.. _#251: wtforms/wtforms#251
.. _#254: wtforms/wtforms#254
.. _#280: wtforms/wtforms#280
.. _#281: wtforms/wtforms#281
.. _#286: wtforms/wtforms#286
.. _#294: wtforms/wtforms#294
.. _#302: wtforms/wtforms#302
.. _#361: wtforms/wtforms#361
.. _#391: wtforms/wtforms#391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment