Welcome Guest, Not a member yet? Register   Sign In
Replacing valid_email() with filter_var()
#4

(05-03-2016, 12:06 PM)InsiteFX Wrote: Yes you would need to write your own or use a callback:

PHP Code:
if (!filter_var($emailFILTER_VALIDATE_EMAIL) === false) {
 
 echo("$email is a valid email address");
} else {
 
 echo("$email is not a valid email address");


I would rather extend the CI_Form_Validation then write a callback. This is the best way to do this because you will have a new rule in all controllers and it's keep clean your controllers
Reply


Messages In This Thread
RE: Replacing valid_email() with filter_var() - by drusnac19 - 10-15-2016, 05:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB