Return: string 'password invalid, only letters and accepted numbers' (length = 55)
class Validapass
{
public function setValidapass($pass)
{
if (strlen($pass)<1)
return 'escreva a password';
else
if(!preg_match('/^[0-9a-z]$/i',$pass))
return 'password invalida, apenas letras e são numeros aceites';
else
return $pass;
}
}