Esempio n. 1
0
 public static bool Validar(string nombre, string Email, string Password)
 {
     try
     {
         if (Cls_Secure.ValidarCampoPorPatron(@"[a-zA-ZñÑ\s]{2,100}", nombre) &&
             (nombre.Length <= 100))
         {
             if (Cls_Secure.ValidarCampoPorPatron(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", Email) &&
                 (Email.Length <= 80))
             {
                 if (Cls_Secure.ValidarCampoPorPatron(@"[a-zA-Z0-9]{4,12}", Password) &&
                     (Password.Length <= 12))
                 {
                     return(true);
                 }
                 else
                 {
                     return(false);
                 }
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             return(false);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 2
0
 public static bool Validar(string Email)
 {
     try
     {
         if (Cls_Secure.ValidarCampoPorPatron(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", Email) &&
             (Email.Length <= 80))
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 3
0
 public static bool ValidarChangePasswod(string Password)
 {
     try
     {
         if (Cls_Secure.ValidarCampoPorPatron(@"[a-zA-Z0-9]{4,12}", Password) &&
             (Password.Length <= 12))
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }