public void TestTextValidation() { const string text = "some text"; var validationText = new ValidationText(); validationText.Validate(text); }
public string ValidateForm(string firstName, string lastName, string email, string age) { try { _validationText.Validate(firstName); _validationText.Validate(lastName); _validationEmail.Validate(email); _validationNumber.Validate(age); return("Validation successfully"); } catch (Exception ex) { return(ex.Message); } }