Beispiel #1
0
        private string validate()
        {
            StringBuilder    builder   = new StringBuilder();
            TextBoxValidator validator = new TextBoxValidator();

            validator.append(builder, validator.checkValidLength(owner_name.Text.Trim(), 50, "Имя владельца"));
            validator.append(builder, validator.checkValidLength(owner_surname.Text.Trim(), 50, "Фамилия владельца"));
            validator.append(builder, validator.checkValidLength(owner_lastname.Text.Trim(), 50, "Отчество владельца"));
            validator.append(builder, validator.PhoneNumberValidate(phone.Text.Trim()));

            if (String.IsNullOrEmpty(builder.ToString()))
            {
                return(null);
            }

            return(builder.ToString());
        }