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); } }
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); } }
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); } }