1 write to AllowEmptyStrings
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
367
AllowEmptyStrings
= true,
4 references to AllowEmptyStrings
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (2)
DataAnnotationsMetadataProviderTest.cs (2)
1165
Assert.True(((RequiredAttribute)attribute).
AllowEmptyStrings
); // non-Default for [Required]
1191
Assert.False(((RequiredAttribute)attribute).
AllowEmptyStrings
); // Default for [Required]
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\RequiredAttribute.cs (2)
36
/// If <see cref="
AllowEmptyStrings
" /> then <see langword="true" /> is returned for empty strings.
46
return
AllowEmptyStrings
|| value is not string stringValue || !string.IsNullOrWhiteSpace(stringValue);