Welcome Guest, Not a member yet? Register   Sign In
Error with email class in CI 3.1.8
#21

(04-07-2018, 05:34 AM)InsiteFX Wrote: ./system/libraries/Form_validation.php
PHP Code:
    /**
     * Valid Email
     *
     * @param    string
     * @return    bool
     */
    
public function valid_email($str)
    {
        if (
function_exists('idn_to_ascii') && preg_match('#\A([^@]+)@(.+)\z#'$str$matches))
        {
            
$domain defined('INTL_IDNA_VARIANT_UTS46')
                ? 
idn_to_ascii($matches[2], 0INTL_IDNA_VARIANT_UTS46)
                : 
idn_to_ascii($matches[2]);
            
$str $matches[1].'@'.$domain;
        }

        return (bool) 
filter_var($strFILTER_VALIDATE_EMAIL);
    } 

Now you can see that it is checking the email domain.

im using the same validation rule in another CI 3.1.5 and it works perfect. but i have this issue on my new project with CI 3.1.8 !

the domain of the entered email is @gmail.com and i tested with my @icloud.com email. but keep showing error that i must enter valid email address !

i have google it and some people reported this as a bug. is it a bug?
Reply


Messages In This Thread
Error with email class in CI 3.1.8 - by ardavan - 04-04-2018, 12:57 AM
RE: Error with email class in CI 3.1.8 - by ardavan - 04-07-2018, 08:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB