Umlauts in email addresses #10114

Closed
opened 2025-12-29 21:27:03 +01:00 by adam · 4 comments
Owner

Originally created by @Azmodeszer on GitHub (Aug 19, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.0.9

Python Version

3.11

Steps to Reproduce

  1. Create a contact.
  2. Enter a mailbox containing an umlaut in the local-part, ex. umläut@server.com

Expected Behavior

Contact is saved, since UTF8SMTP is a thing: https://www.rfc-editor.org/rfc/rfc5336#section-3.2

Observed Behavior

Contact is not saved and email field is highlighted red. No additional explanation appears. image

Originally created by @Azmodeszer on GitHub (Aug 19, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.0.9 ### Python Version 3.11 ### Steps to Reproduce 1. Create a contact. 2. Enter a mailbox containing an umlaut in the local-part, ex. `umläut@server.com` ### Expected Behavior Contact is saved, since UTF8SMTP is a thing: https://www.rfc-editor.org/rfc/rfc5336#section-3.2 ### Observed Behavior Contact is not saved and email field is highlighted red. No additional explanation appears. ![image](https://github.com/user-attachments/assets/69c6b52b-43bb-41e9-a185-5acc3512fff3)
adam added the type: bugseverity: low labels 2025-12-29 21:27:03 +01:00
adam closed this issue 2025-12-29 21:27:03 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 19, 2024):

This is caused by frontend validation; the form never actually gets submitted.

AFAICT this is native to the browser for <input type="email"> elements. We're only checking against validity.valid on the field prior to form submission. Seems like this has been a known bug in the specification for some time.

@jeremystretch commented on GitHub (Aug 19, 2024): This is caused by [frontend validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#validation); the form never actually gets submitted. AFAICT this is native to the browser for `<input type="email">` elements. We're only checking against `validity.valid` on the field prior to form submission. Seems like this has been a [known bug](https://www.w3.org/Bugs/Public/show_bug.cgi?id=15489) in the specification for some time.
Author
Owner

@jeremystretch commented on GitHub (Aug 19, 2024):

No additional explanation appears.

Considering this from a higher level, maybe it would be best to just do away with this validation entirely, as marking a field as invalid without including an explanatory message is of limited value. Error messages are currently provided only via backend authentication (after submitting the form).

@jeremystretch commented on GitHub (Aug 19, 2024): > No additional explanation appears. Considering this from a higher level, maybe it would be best to just do away with this validation entirely, as marking a field as invalid without including an explanatory message is of limited value. Error messages are currently provided only via backend authentication (after submitting the form).
Author
Owner

@jeremystretch commented on GitHub (Aug 26, 2024):

Discussed this with the other maintainers. The consensus was to ignore frontend validation for email fields specifically, but otherwise leave it intact (for now, at least) to avoid introducing unexpected behavior elsewhere.

@jeremystretch commented on GitHub (Aug 26, 2024): Discussed this with the other maintainers. The consensus was to ignore frontend validation for email fields specifically, but otherwise leave it intact (for now, at least) to avoid introducing unexpected behavior elsewhere.
Author
Owner

@jeremystretch commented on GitHub (Aug 26, 2024):

Unfortunately, even if we disable our custom validation styling, the browser (Firefox and Chrome, at least) is quite adamant that this is not a valid email address.

screenshot

As NetBox is not doing anything unique here - it's just a regular <input type="email"> on the page - we'll have to defer to how the browser handles this validation. The only other option would be to declare the field as a regular, unformatted input without any validation, which obviously would be problematic.

I'm going to close this out as it doesn't appear that we have any workable options, but I'm happy to re-open this if anyone comes up with something clever.

@jeremystretch commented on GitHub (Aug 26, 2024): Unfortunately, even if we disable our custom validation styling, the browser (Firefox and Chrome, at least) is quite adamant that this is not a valid email address. ![screenshot](https://github.com/user-attachments/assets/741b5aa1-8c78-4d26-b885-0efd70570e28) As NetBox is not doing anything unique here - it's just a regular `<input type="email">` on the page - we'll have to defer to how the browser handles this validation. The only other option would be to declare the field as a regular, unformatted input without _any_ validation, which obviously would be problematic. I'm going to close this out as it doesn't appear that we have any workable options, but I'm happy to re-open this if anyone comes up with something clever.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10114