# coding: utf-8
import re
from django.core.validators import EmailValidator
class JapaneseEmailValidator(EmailValidator):
user_regex = re.compile(
r"(^[-.!#$%&'*+/=?^_`{}|~0-9A-Z]+$" # dot-atom (\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*を省略
r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"$)', # quoted-string
re.IGNORECASE)
More than 5 years have passed since last update.
Python Django 日本のキャリアメールがEmailValidatorで弾かれるケースの対処法
Last updated at Posted at 2014-08-13
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme