private string ValidateProfile() { string msg = string.Empty; if (!ValidatorHelper.IsValidPhone(dc.TheUser.Phone)) { msg += "Phone Number Is Not Valid\n"; } if (dc.TheUser.Fname == null || dc.TheUser.Fname.Length <= 1 || ValidatorHelper.HasComma(dc.TheUser.Fname)) { msg += "First Name Is Not Valid!\n"; } if (dc.TheUser.Lname == null || dc.TheUser.Lname.Length <= 1 || ValidatorHelper.HasComma(dc.TheUser.Lname)) { msg += "Last Name Is Not Valid!\n"; } if (dc.TheUser.Info == null || dc.TheUser.Info.Length <= 1 || ValidatorHelper.HasComma(dc.TheUser.Info)) { msg += "Info Is Not Valid!\n"; } if (dc.TheUser.Sex == null) { msg += "Sex Is Not Valid!\n"; } if (dc.TheUser.Preference == null) { msg += "Preference Is Not Valid!\n"; } if (dc.TheUser.AreaCode == null) { msg += "Area Code Is Not Valid!\n"; } return(msg); }
private string ValidateRegister() { string msg = string.Empty; if (!ValidatorHelper.IsValidEmail(dc.TheUser.Email)) { msg += "Email Is Not Valid\n"; } if (!ValidatorHelper.IsValidPassword(dc.TheUser.Password)) { msg += "Password Is Not Valid\n"; } if (!ValidatorHelper.IsValidPhone(dc.TheUser.Phone)) { msg += "Phone Number Is Not Valid\n"; } if (dc.TheUser.Fname == null || dc.TheUser.Fname.Length <= 1 || ValidatorHelper.HasComma(dc.TheUser.Fname)) { msg += "First Name Is Not Valid!\n"; } if (dc.TheUser.Lname == null || dc.TheUser.Lname.Length <= 1 || ValidatorHelper.HasComma(dc.TheUser.Lname)) { msg += "Last Name Is Not Valid!\n"; } if (dc.TheUser.Info == null || dc.TheUser.Info.Length <= 1 || ValidatorHelper.HasComma(dc.TheUser.Info)) { msg += "Info Is Not Valid!\n"; } if (dc.TheUser.Sex == null) { msg += "Sex Is Not Valid!\n"; } if (dc.TheUser.Preference == null) { msg += "Preference Is Not Valid!\n"; } if (dc.TheUser.AreaCode == null) { msg += "Area Code Is Not Valid!\n"; } if (dc.TheUser.Image == null || dc.TheUser.Image.Length <= 1) { msg += "Image Is Not Valid"; } return(msg); }