/// <summary>
        /// Creates <see cref="SnippetValidator"/> that contains validation rules defines in <see cref="Validations"/> namespace.
        /// </summary>
        /// <returns><see cref="SnippetValidator"/> with predefined validation rules.</returns>
        public static SnippetValidator CreateDefaultValidator()
        {
            var validator = new SnippetValidator();

            validator.ValidationRules.AddRange(ValidationRule.PredefinedRules);

            return validator;
        }
Example #2
0
        /// <summary>
        /// Creates <see cref="SnippetValidator"/> that contains validation rules defines in <see cref="Validations"/> namespace.
        /// </summary>
        /// <returns><see cref="SnippetValidator"/> with predefined validation rules.</returns>
        public static SnippetValidator CreateDefaultValidator()
        {
            var validator = new SnippetValidator();

            validator.ValidationRules.AddRange(ValidationRule.PredefinedRules);

            return(validator);
        }