Beispiel #1
0
        public void TestTextValidation()
        {
            const string text           = "some text";
            var          validationText = new ValidationText();

            validationText.Validate(text);
        }
Beispiel #2
0
        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);
            }
        }