public IEnumerable <ValidationResult> Validate(ValidationContext validationContext)
        {
            if (string.IsNullOrWhiteSpace(Name) &&
                string.IsNullOrWhiteSpace(MasteryRequirement) &&
                !CodexSection.HasValue)
            {
                yield return(new ValidationResult("You must enter at least one search critria"));
            }

            if (!string.IsNullOrWhiteSpace(MasteryRequirement))
            {
                MasteryRequirement = MasteryRequirement.Replace(" ", "");
                foreach (string part in MasteryRequirement.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
                {
                    if (!Regex.IsMatch(part, _masteryRegexPattern))
                    {
                        yield return(new ValidationResult($"Invalid Query Syntax: {part}", new[] { "MasteryRequirement" }));
                    }
                }
            }
        }
        public List <string> GetMasteryRequirementParts()
        {
            if (string.IsNullOrWhiteSpace(MasteryRequirement))
            {
                return(null);
            }

            MasteryRequirement = MasteryRequirement.Replace(" ", "");

            string[] parts = MasteryRequirement.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

            foreach (string part in parts)
            {
                if (!Regex.IsMatch(part, _masteryRegexPattern))
                {
                    throw new Exception($"Invalid Query Syntax: {part}");
                }
            }

            return(parts.ToList());
        }