Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The email field type does not validate for proper email addresses, e.g. the following all pass:
- test@t
- test@test
- test@test.test
Comments
Comment #1
DamienMcKennaOn line 144 of components/email.inc it says:
This runs the system function "valid_email_address()" to determine of the address is valid, therefore the problem is with Drupal's internal function and not webform.
Comment #2
DamienMcKennaThere's a patch for core to fix this: #265548: valid_email_address() is not RFC compliant
Comment #3
quicksketchWe'll pass this on to core. I actually currently use "nate@localhost" regularly in my testing, which isn't actually a valid address according to spec but works anyway. Though using D7 I've gotten used to "nate@localhost.localhost", which works also and matches spec.