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?
This code is displaying "valid email". Did I miss something? Please help.
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.