Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Validação de Email

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: Portuguese
View previous topic :: View next topic  
Author Message
temonteiro
Smarty n00b


Joined: 09 Jun 2010
Posts: 1

PostPosted: Thu Aug 19, 2010 2:07 pm    Post subject: Validação de Email Reply with quote

Oi gente,
Vocês conhecem uma maneira de validar um email(verificar se ele foi escrito da maneira correta) usando Smarty?
Back to top
View user's profile Send private message
Zeca_JP
Smarty n00b


Joined: 23 Oct 2013
Posts: 1

PostPosted: Wed Oct 23, 2013 11:43 am    Post subject: e aí.. Reply with quote

Bom.....eu uso essa função no php mesmo...nunca tive problema, funciona de boa..

Code:

/*****************************
VALIDA O EMAIL
*****************************/   
   
   function valMail($email){
      if(preg_match('/[a-z0-9_\.\-]+@[a-z0-9_\.\-]*[a-z0-9_\.\-]+\.[a-z]{2,4}$/',$email)){
         return true;
      }else{
         return false;
      }
   }


espero ter ajudado..um abraço.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: Portuguese All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP