3 instantiations of ValidationError
System.ComponentModel.DataAnnotations (3)
DataAnnotations\Validator.cs (3)
370
errors.Add(new
ValidationError
(null, instance, result));
406
errors.Add(new
ValidationError
(reqAttr, property.Value, validationResult));
521
validationError = new
ValidationError
(attribute, value, validationResult);
18 references to ValidationError
System.ComponentModel.DataAnnotations (18)
DataAnnotations\Validator.cs (18)
51
foreach (
ValidationError
err in GetValidationErrors(value, validationContext, attributes, breakOnFirstError)) {
125
foreach (
ValidationError
err in GetObjectValidationErrors(instance, validationContext, validateAllProperties, breakOnFirstError)) {
163
foreach (
ValidationError
err in GetValidationErrors(value, validationContext, validationAttributes, breakOnFirstError)) {
188
ValidationError
err = GetValidationErrors(value, validationContext, attributes, false).FirstOrDefault();
237
ValidationError
err = GetObjectValidationErrors(instance, validationContext, validateAllProperties, false).FirstOrDefault();
263
ValidationError
err = GetValidationErrors(value, validationContext, validationAttributes, false).FirstOrDefault();
336
private static IEnumerable<
ValidationError
> GetObjectValidationErrors(object instance, ValidationContext validationContext, bool validateAllProperties, bool breakOnFirstError) {
346
List<
ValidationError
> errors = new List<
ValidationError
>();
386
/// <returns>A list of <see cref="
ValidationError
"/> instances.</returns>
387
private static IEnumerable<
ValidationError
> GetObjectPropertyValidationErrors(object instance, ValidationContext validationContext, bool validateAllProperties, bool breakOnFirstError) {
389
List<
ValidationError
> errors = new List<
ValidationError
>();
472
private static IEnumerable<
ValidationError
> GetValidationErrors(object value, ValidationContext validationContext, IEnumerable<ValidationAttribute> attributes, bool breakOnFirstError) {
477
List<
ValidationError
> errors = new List<
ValidationError
>();
478
ValidationError
validationError;
514
private static bool TryValidate(object value, ValidationContext validationContext, ValidationAttribute attribute, out
ValidationError
validationError) {