The Low Down
- Email validation is a particularly difficult (screenshot) to do perfectly (via JS or Server Side validation).
- Mobile devices with dynamic keyboards, including iOS and Android, brings up an email keyboard featuring the “@” and “.” keys
- Safari and Android validate email addresses, supporting :valid and :invalid, but do not provide constraint on form submission.
- Falls back to a regular text input.
- Include the
multipleattribute to accept more than one comma separated email address. If you also include the
patternattribute, remember the pattern must match the entire value, including the comma and optional spaces.
- Use case: simple contact forms
- Careful with double-byte internationalized domain names, Firefox, Safari and Chrome, but not Opera, invalidate them.