Exemple #1
0
        public static string GetMessage(RequiredTypes type, BasilSettings settings)
        {
            if (settings == null) return String.Empty;

            switch (type)
            {
                case RequiredTypes.Text:
                    return settings.RequiredFieldValidation.Message;

                case RequiredTypes.Zip:
                    return settings.ZipValidation.Message;

                case RequiredTypes.Phone:
                    return settings.PhoneValidation.Message;

                case RequiredTypes.Email:
                    return settings.EmailValidation.Message;

                case RequiredTypes.SSN:
                    return settings.SocialSecurityNumberValidation.Message;

                case RequiredTypes.Number:
                    return settings.NumericEntryValidation.Message;

                case RequiredTypes.Date:
                    return settings.DateValidation.Message;
            }

            return null;
        }
Exemple #2
0
        public BasilValidator(BasilSettings settings, bool addRelEqualsTooltip = false)
        {
            Settings = settings;

            AddRelEqualsTooltip = addRelEqualsTooltip;
        }
Exemple #3
0
        public BasilValidator(bool addRelEqualsTooltip = false)
        {
            Settings = new BasilSettings();

            AddRelEqualsTooltip = addRelEqualsTooltip;
        }