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; }
public BasilValidator(BasilSettings settings, bool addRelEqualsTooltip = false) { Settings = settings; AddRelEqualsTooltip = addRelEqualsTooltip; }
public BasilValidator(bool addRelEqualsTooltip = false) { Settings = new BasilSettings(); AddRelEqualsTooltip = addRelEqualsTooltip; }