public void EmailString(string email) { if (string.IsNullOrEmpty(email)) { throw new Exception(ErrorMessages.EmailEmpty); } if (!RegularExpressions.Email().IsMatch(email) || email.Length > 50) { throw new Exception(ErrorMessages.EmailInvalid); } }