mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
006af0b985
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