Skip to content

Instantly share code, notes, and snippets.

@kroatoanweb
Created July 20, 2016 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kroatoanweb/a672f20a8398d6b284d048e5dfa10dd8 to your computer and use it in GitHub Desktop.
Save kroatoanweb/a672f20a8398d6b284d048e5dfa10dd8 to your computer and use it in GitHub Desktop.
<?php
/**
*
* Valida un email usando funciones de manejo de strings.
* Devuelve true si es correcto o false en caso contrario
*
* @param string $str la dirección a validar
* @return boolean
*
*/
function is_valid_email($str)
{
return (false !== strpos($str, "@") && false !== strpos($str, "."));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment