Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

Problem with valid_email return true for invalid email address

$
0
0
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*k+m@gmail.com" 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*k+m@gmail.com'))
        {
            echo 
'valid email';
        }
        else
        {
            echo 
'invalid email';
        }
        
$this->load->view('welcome_message');
    }



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

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>