Validates an email address
    Source: Himanshu Shankar (https://github.com/iamhssingh)
    Parameters
    ----------
    email: str

    Returns
    -------
    bool
550235
def validate_email(email):
    
    from django.core.validators import validate_email
    from django.core.exceptions import ValidationError
    try:
        validate_email(email)
        return True
    except ValidationError:
        return False
1215599
def validate_comma_separated_emails(value):
    
    if not isinstance(value, (tuple, list)):
        raise ValidationError('Email list must be a list/tuple.')

    for email in value:
        try:
            validate_email_with_name(email)
        except ValidationError:
            raise ValidationError('Invalid email: %s' % email, code='invalid')
100757
def create_emailconfirmation(self, email_address):
        ""
        confirmation_key = self.generate_key(email_address.email)
        confirmation = self.create(
            email_address=email_address,
            created_at=now(),
            key=confirmation_key,
        )
        return confirmation
714785
def is_email():
    

    email = (
        ur'(?!^\.)'     # No dot at start
        ur'(?!.*\.@)'   # No dot before at sign
        ur'(?!.*@\.)'   # No dot after at sign
        ur'(?!.*\.$)'   # No dot at the end
        ur'(?!.*\.\.)'  # No double dots anywhere
        ur'^\S+'        # Starts with one or more non-whitespace characters
        ur'@'           # Contains an at sign
        ur'\S+$'        # Ends with one or more non-whitespace characters
    )

    regex = re.compile(email, re.IGNORECASE | re.UNICODE)

    def validate(value):
        if not regex.match(value):
            return e("{} is not a valid email address", value)
    return validate
177233
public static function isEmail($email) {
        if (!is_string($email) || strlen($email) > 255)
            return false;
        if (Tools::phpVersionCompareTo('5.3.3') >= 0)
            return (boolean) filter_var($email, FILTER_VALIDATE_EMAIL);
        else
            return (boolean) preg_match('`^(?!\.)[.\w!#$%&\'*+/=?^_\`{|}~-]+@(?!-)[\w-]+\.\w+$`i', $email);
    }
268461
private function validateEmail($email) {

		if(true === is_string($email)) {
			return false !== filter_var(trim($email), \FILTER_VALIDATE_EMAIL);
		}

		return false;
	}
1371384
def clean_email(self):
        
        if get_user_model().objects.filter(
            Q(email__iexact=self.cleaned_data['email']) |
            Q(email_unconfirmed__iexact=self.cleaned_data['email'])):
            raise forms.ValidationError(_(u'This email address is already '
                        'in use. Please supply a different email.'))
        return self.cleaned_data['email']
671854
def validate(self, value):
        
        if isinstance(value, (str, unicode)) and not re.match(self.__pattern, value):
            raise orb.errors.ColumnValidationError(self, 'The email provided is not valid.')
        else:
            return super(EmailColumn, self).validate(value)
194756
def extract_email(text):
    
    result = list()
    for tp in re.findall(_regex_extract_email, text.lower()):
        for email in tp:
            if re.match(_regex_validate_email, email):
                result.append(email)
    return result
919241
def send_verification_email(self, body):
        
        return self.client.post(self._url('verification-email'), data=body)
842074
def validate_verification(self, confirmation_code, attribute='email'):
        
        self.check_token()
        return self.client.verify_user_attribute(
            AccessToken=self.access_token,
            AttributeName=attribute,
            Code=confirmation_code
        )
1246362
def create_email_verification(self, body):
        
        return self.client.post(self._url('email-verification'), data=body)
568626
def convert(self, value, param, ctx):
        
        rxp = '^[^@]+?@[-.a-z0-9]+$'
        regex = re.compile(rxp, re.I)
        try:
            if regex.match(value):
                value = value.split("@")
                return value
            else:
                self.fail('%s is not a valid email address' % value, param,
                          ctx)
        except ValueError:
            self.fail('%s is not a valid email address' % value, param, ctx)
542911
def is_email_verified(self, request, email):
        
        ret = False
        verified_email = request.session.get('account_verified_email')
        if verified_email:
            ret = verified_email.lower() == email.lower()
        return ret
1235480
def is_valid(email):
        
        if isinstance(email, basestring) and EMAIL_RE.match(email):
            return True
        return False
594883
public static function verify_email_address($email) {
		$email = trim($email);
		if (!$email || strlen($email) > 64)
			return false;
		return filter_var($email, FILTER_VALIDATE_EMAIL);
	}
203136
def validate(self, email, **kwargs):
        """"""
        email = stringify(email)
        if email is None:
            return
        if not self.EMAIL_REGEX.match(email):
            return False
        mailbox, domain = email.rsplit('@', 1)
        return self.domains.validate(domain, **kwargs)