public RegexStringValidator(string regex) { if (string.IsNullOrEmpty(regex)) { throw ExceptionUtil.ParameterNullOrEmpty("regex"); } _expression = regex; _regex = new Regex(regex, RegexOptions.Compiled); }