Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Email Max Length Validation is Incorrect #15606

Closed
@kcjmowright

Description

@kcjmowright

Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.

Do you want to request a feature or report a bug?

Report a bug.

What is the current behavior?

The default angular validation marks an email field invalid for anything longer than 128 characters.
0123456789012345678901234567890123456789012345678901234567890123@012345678901234567890123456789012345678901234567890123456789012 is the longest “valid” email address angular validation will allow on an input type email. 64 characters before the @ symbol and 63 characters after the @ symbol for a total of 128 characters.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).

See http://plnkr.co/edit/Lb4vJq?p=preview

What is the expected behavior?

RFC 3696 specifies a maximum of 320 characters (octets) including separators. RFC 3696 is supplanted by RFC 5321 which specifies 64 characters (octets) before the @ symbol or 255 characters after the @ symbol up to 256 characters total including separators ( See https://tools.ietf.org/html/rfc5321#section-4.5.3 ).

What is the motivation / use case for changing the behavior?

The motivation for this behavior is to be able to support, at a minimum, a RFC 5321 compliant e-mail address.

Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.

Angular 1.5.10 and the latest snapshot are affected by this issue.

It looks like the behavior changed starting with angular 1.5.7. Prior versions supported longer email addresses.

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions