Skip to content

Expand email validation description in API doc - #32747

Closed
jbogarthyde wants to merge 1 commit into
angular:masterfrom
jbogarthyde:jb-apidoc-validators
Closed

jbogarthyde wants to merge 1 commit into
angular:masterfrom
jbogarthyde:jb-apidoc-validators

Conversation

@jbogarthyde

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Email validation pattern is not described, making it difficult to decide between Validators.email() and Validators.pattern().

Issue Number:
#18985
#25186

What is the new behavior?

Describe EMAIL_REGEXP and reference pattern() as an alternative to the default behavior.

Does this PR introduce a breaking change?

  • Yes
  • No

@jbogarthyde
jbogarthyde requested a review from a team September 18, 2019 17:30
@jbogarthyde jbogarthyde self-assigned this Sep 18, 2019
@ngbot ngbot Bot modified the milestone: Backlog Sep 18, 2019
@jbogarthyde
jbogarthyde requested a review from gkalpak September 18, 2019 17:31
@mary-poppins

Copy link
Copy Markdown

@jbogarthyde

jbogarthyde commented Sep 18, 2019 •

Copy link
Copy Markdown
Contributor Author

EMAIL_REGEXP is an Angular type defined in this file, but is not public.
Presumably it's value can change in new releases, so we don't want to hard-code the current value in the doc--but I would like to provide an X-ref where people can inspect the current value.
Can we surface the type? and/or provide a more useful description of the pattern's pros and cons? @gkalpak @kara

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@jbogarthyde
jbogarthyde force-pushed the jb-apidoc-validators branch from 3469acc to f9ea84d Compare October 1, 2019 15:58
@mary-poppins

Copy link
Copy Markdown

@mary-poppins

Copy link
Copy Markdown

@jbogarthyde
jbogarthyde force-pushed the jb-apidoc-validators branch from e3e9175 to 43967d2 Compare October 3, 2019 15:26
@mary-poppins

Copy link
Copy Markdown

gkalpak added a commit to gkalpak/angular that referenced this pull request Oct 5, 2019
Previously, there was no documentation of what `Validators.email()`
expects as a valid e-mail address, making it difficult for people to
determine whether it covers their requirements or not. Even more so that
the used pattern slightly deviates from the
[WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
One's only option was to look at the source code and try to decipher the
regexp pattern.

This commit adds a high-level description of the validator and mentions
its similarity to and differences from the WHATWG version. It also adds
a brief explanation of the regexp's behavior and references for more
information in the source code to provide more context to
maintainers/users trying to understand the implementation in the future.

Fixes angular#18985
Fixes angular#25186
Closes angular#32747
@jbogarthyde

Copy link
Copy Markdown
Contributor Author

Superseded by #32961

@jbogarthyde jbogarthyde closed this Oct 7, 2019
@jbogarthyde
jbogarthyde deleted the jb-apidoc-validators branch October 7, 2019 15:26
alxhub pushed a commit that referenced this pull request Oct 7, 2019
Previously, there was no documentation of what `Validators.email()`
expects as a valid e-mail address, making it difficult for people to
determine whether it covers their requirements or not. Even more so that
the used pattern slightly deviates from the
[WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
One's only option was to look at the source code and try to decipher the
regexp pattern.

This commit adds a high-level description of the validator and mentions
its similarity to and differences from the WHATWG version. It also adds
a brief explanation of the regexp's behavior and references for more
information in the source code to provide more context to
maintainers/users trying to understand the implementation in the future.

Fixes #18985
Fixes #25186
Closes #32747

PR Close #32961
alxhub pushed a commit that referenced this pull request Oct 7, 2019
Previously, there was no documentation of what `Validators.email()`
expects as a valid e-mail address, making it difficult for people to
determine whether it covers their requirements or not. Even more so that
the used pattern slightly deviates from the
[WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
One's only option was to look at the source code and try to decipher the
regexp pattern.

This commit adds a high-level description of the validator and mentions
its similarity to and differences from the WHATWG version. It also adds
a brief explanation of the regexp's behavior and references for more
information in the source code to provide more context to
maintainers/users trying to understand the implementation in the future.

Fixes #18985
Fixes #25186
Closes #32747

PR Close #32961
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Nov 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants