1 write to Metadata
System.Web (1)
ModelBinding\ModelValidator.cs (1)
14
Metadata
= metadata;
15 references to Metadata
System.Web (15)
ModelBinding\DataAnnotationsModelValidator.cs (8)
28
return errorMsg ?? Attribute.FormatErrorMessage(
Metadata
.GetDisplayName());
31
return Attribute.FormatErrorMessage(
Metadata
.GetDisplayName());
74
ValidationContext context = new ValidationContext(container ??
Metadata
.Model, null, null);
75
context.DisplayName =
Metadata
.GetDisplayName();
80
memberName =
Metadata
.PropertyName ??
Metadata
.ModelType.Name;
84
ValidationResult result = Attribute.GetValidationResult(
Metadata
.Model, context);
98
return GetLocalizedString(errorMessage,
Metadata
.GetDisplayName());
ModelBinding\ModelValidator.cs (3)
49
foreach (ModelMetadata propertyMetadata in
Metadata
.Properties) {
51
foreach (ModelValidationResult propertyResult in propertyValidator.Validate(
Metadata
.Model)) {
62
foreach (ModelValidator typeValidator in
Metadata
.GetValidators(ModelBindingExecutionContext)) {
ModelBinding\RangeAttributeAdapter.cs (1)
10
return GetLocalizedString(errorMessage,
Metadata
.GetDisplayName(), Attribute.Minimum, Attribute.Maximum);
ModelBinding\RegularExpressionAttributeAdapter.cs (1)
10
return GetLocalizedString(errorMessage,
Metadata
.GetDisplayName(), Attribute.Pattern);
ModelBinding\StringLengthAttributeAdapter.cs (1)
10
return GetLocalizedString(errorMessage,
Metadata
.GetDisplayName(), Attribute.MinimumLength, Attribute.MaximumLength);
ModelBinding\ValidatableObjectAdapter.cs (1)
17
object model =
Metadata
.Model;