mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
Django's Model.EmailField's default max_length is 254 characters, while the Form.EmailField's default max length is 320 characters. The longer valid length for form email fields raises an error when an email with over 254 characters is validated and the server attempts to create a preregistration user or realm. Sets the max length on current form EmailFields to match the max length on corresponding email fields in the database. For the form MultiEmailField used on the find account/team page, we don't need to set the max length to 254, but we don't expect any emails longer than that to match any existing user accounts. Adds tests in `zerver/tests/test_signup.py` for form submissions with long email addresses.