/// <summary>
            /// Sets that a field value must match the specified regular expression.
            /// </summary>
            /// <param name="target">The target name (ie, a hint about the controller being validated)</param>
            /// <param name="regExp">The reg exp.</param>
            /// <param name="violationMessage">The violation message.</param>
            public void SetRegExp(string target, string regExp, string violationMessage)
            {
                var rule = "validate-regex" + regExp.GetHashCode();

                AddClass(rule);
                config.AddCustomRule(rule, violationMessage, "pattern : /" + regExp + "/");
                AddTitle(violationMessage);
            }