Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This PR was merged into the 4.1-dev branch.Discussion----------[Validator] Html5 Email ValidationCurrently we only support a very loose validation. There is now astandard HTML5 element with matching regex. This will add the abilityto set a `mode` on the email validator. The mode will change thevalidation 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 ElementDeprecates 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 commentedDec 11, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
xabbuh left a comment
There was a problem hiding this 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 forthe 'loose', 'strict', and 'html5' options.
xabbuh commentedDec 22, 2017
Thank you@PurpleBooth. |
This PR was merged into the master branch.Discussion----------[Validator] Html5 Email ValidationAdd documentation about the new mode parameter. Adds descriptions forthe 'loose', 'strict', and 'html5' options.Relates tosymfony/symfony#24442Commits-------07d4bf9 [Validator] Html5 Email Validation
| | Applies to|:ref:`property or method<validation-property-target>`| | ||
| +----------------+---------------------------------------------------------------------+ | ||
| | Options| - `strict`_| | ||
| | Options| - `mode`_| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Shouldn't thestrict option have been annotated as "deprecated in Symfony 4.1" rather than completely replaced?
Add documentation about the new mode parameter. Adds descriptions for
the 'loose', 'strict', and 'html5' options.
Relates tosymfony/symfony#24442