Welcome Guest, Not a member yet? Register   Sign In
Problem with valid_email return true for invalid email address
#1

Hello,

I'm new to CI and just setup and working on the sign up form, but some how the valid_email rule in form validation is not working. I have tried the function valid_email() too and it's still not working. How come this email "a!b#c$e%g^h&j*[email protected]" can pass the validation?
PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

class 
Welcome extends CI_Controller
{
    public function 
index()
    {
        
$this->load->helper('email');

        if(
valid_email('a!b#c$e%g^h&j*[email protected]'))
        {
            echo 
'valid email';
        }
        else
        {
            echo 
'invalid email';
        }
        
$this->load->view('welcome_message');
    }



This code is displaying "valid email". Did I miss something? Please help.
Reply


Messages In This Thread
Problem with valid_email return true for invalid email address - by zjonsnowz - 03-17-2018, 11:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB