8000 [Validator] Html5 Email Validation by PurpleBooth · Pull Request #8487 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Html5 Email Validation #8487

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

Merged
merged 1 commit into from
Dec 22, 2017
Merged

[Validator] Html5 Email Validation #8487

merged 1 commit into from
Dec 22, 2017

Conversation

PurpleBooth
Copy link
Contributor

Add documentation about the new mode parameter. Adds descriptions for
the 'loose', 'strict', and 'html5' options.

Relates to symfony/symfony#24442

@xabbuh xabbuh added this to the 3.4 milestone Oct 6, 2017
@xabbuh xabbuh added the On hold label Oct 6, 2017
fabpot added a commit to symfony/symfony that referenced this pull request Dec 11, 2017
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Validator] Html5 Email Validation

Currently we only support a very loose validation. There is now a
standard HTML5 element with matching regex. This will add the ability
to set a `mode` on the email validator. The mode will change the
validation that is applied to the field as a whole.

These modes are:

* loose: The pattern from previous Symfony versions (default)
* strict: Strictly matching the RFC
* html5: The regex used for the HTML5 Element

Deprecates the `strict=true` parameter in favour of `mode='strict'`

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #21531
| License       | MIT
| Doc PR        | symfony/symfony-docs#8487

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

cf04108 [Validator] Html5 Email Validation
@PurpleBooth PurpleBooth changed the base branch from 3.4 to master December 11, 2017 20:43
@PurpleBooth
Copy link
Contributor Author
PurpleBooth commented Dec 11, 2017

I've rebased this off master, as eventually the PR went into the 4.1 branch (which is currently master).

I'd love get this reviewed now that that's merged in.

@xabbuh xabbuh removed the On hold label Dec 12, 2017
@xabbuh xabbuh modified the milestones: 3.4, 4.1 Dec 12, 2017
8000
Copy link
Member
@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I have just left a few minor comments. Thanks for creating the feature and writing the documentation for it.

Add documentation about the new mode parameter. Adds descriptions for
the 'loose', 'strict', and 'html5' options.
@xabbuh
Copy link
Member
xabbuh commented Dec 22, 2017

Thank you @PurpleBooth.

@xabbuh xabbuh merged commit 07d4bf9 into symfony:master Dec 22, 2017
xabbuh added a commit that referenced this pull request Dec 22, 2017
This PR was merged into the master branch.

Discussion
----------

[Validator] Html5 Email Validation

Add documentation about the new mode parameter. Adds descriptions for
the 'loose', 'strict', and 'html5' options.

Relates to symfony/symfony#24442

Commits
-------

07d4bf9 [Validator] Html5 Email Validation
@PurpleBooth PurpleBooth deleted the optional-email-filter branch December 22, 2017 11:14
@@ -7,7 +7,7 @@ cast to a string before being validated.
+----------------+---------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
+----------------+---------------------------------------------------------------------+
| Options | - `strict`_ |
| Options | - `mode`_ |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the strict option have been annotated as "deprecated in Symfony 4.1" rather than completely replaced?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0