1 write to Attribute
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
ValidationAttributeAdapterOfTAttribute.cs (1)
26
Attribute
= attribute;
27 references to Attribute
Microsoft.AspNetCore.Mvc.DataAnnotations (27)
CompareAttributeAdapter.cs (2)
39
Attribute
);
41
((CompareAttributeWrapper)
Attribute
).ValidationContext = validationContext;
DataTypeAttributeAdapter.cs (1)
42
Attribute
.GetDataTypeName());
FileExtensionsAttributeAdapter.cs (1)
23
var normalizedExtensions =
Attribute
.Extensions.Replace(" ", string.Empty).Replace(".", string.Empty).ToLowerInvariant();
MaxLengthAttributeAdapter.cs (2)
18
_max =
Attribute
.Length.ToString(CultureInfo.InvariantCulture);
38
Attribute
.Length);
MinLengthAttributeAdapter.cs (2)
18
_min =
Attribute
.Length.ToString(CultureInfo.InvariantCulture);
38
Attribute
.Length);
RangeAttributeAdapter.cs (4)
26
_max = Convert.ToString(
Attribute
.Maximum, CultureInfo.InvariantCulture)!;
27
_min = Convert.ToString(
Attribute
.Minimum, CultureInfo.InvariantCulture)!;
48
Attribute
.Minimum,
49
Attribute
.Maximum);
RegularExpressionAttributeAdapter.cs (2)
23
MergeAttribute(context.Attributes, "data-val-regex-pattern",
Attribute
.Pattern);
34
Attribute
.Pattern);
StringLengthAttributeAdapter.cs (6)
19
_max =
Attribute
.MaximumLength.ToString(CultureInfo.InvariantCulture);
20
_min =
Attribute
.MinimumLength.ToString(CultureInfo.InvariantCulture);
31
if (
Attribute
.MaximumLength != int.MaxValue)
36
if (
Attribute
.MinimumLength != 0)
50
Attribute
.MaximumLength,
51
Attribute
.MinimumLength);
ValidationAttributeAdapterOfTAttribute.cs (7)
59
/// Gets the error message formatted using the <see cref="
Attribute
"/>.
62
/// <see cref="
Attribute
"/>.</param>
70
!string.IsNullOrEmpty(
Attribute
.ErrorMessage) &&
71
string.IsNullOrEmpty(
Attribute
.ErrorMessageResourceName) &&
72
Attribute
.ErrorMessageResourceType == null)
74
return _stringLocalizer[
Attribute
.ErrorMessage, arguments];
77
return
Attribute
.FormatErrorMessage(modelMetadata.GetDisplayName());