8 types derived from DataTypeAttribute
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (2)
ModelMetadataProviderTest.cs (2)
927private class DataTypeWithCustomDisplayFormat : DataTypeAttribute 938private class DataTypeWithCustomEditFormat : DataTypeAttribute
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\CreditCardAttribute.cs (1)
7public sealed class CreditCardAttribute : DataTypeAttribute
System\ComponentModel\DataAnnotations\EmailAddressAttribute.cs (1)
8public sealed class EmailAddressAttribute : DataTypeAttribute
System\ComponentModel\DataAnnotations\EnumDataTypeAttribute.cs (1)
12public sealed class EnumDataTypeAttribute : DataTypeAttribute
System\ComponentModel\DataAnnotations\FileExtensionsAttribute.cs (1)
13public sealed class FileExtensionsAttribute : DataTypeAttribute
System\ComponentModel\DataAnnotations\PhoneAttribute.cs (1)
8public sealed class PhoneAttribute : DataTypeAttribute
System\ComponentModel\DataAnnotations\UrlAttribute.cs (1)
8public sealed class UrlAttribute : DataTypeAttribute
78 instantiations of DataTypeAttribute
BasicWebSite (1)
Models\LoginViewModel.cs (1)
15[DataType(DataType.Password)]
HtmlGenerationWebSite (2)
Models\CustomerRecord.cs (1)
23[DataType(DataType.EmailAddress)]
Models\Person.cs (1)
46[DataType(DataType.EmailAddress)]
Identity.ExternalClaims (13)
Pages\Account\Login.cshtml.cs (1)
46[DataType(DataType.Password)]
Pages\Account\LoginWith2fa.cshtml.cs (1)
39[DataType(DataType.Text)]
Pages\Account\LoginWithRecoveryCode.cshtml.cs (1)
37[DataType(DataType.Text)]
Pages\Account\Manage\ChangePassword.cshtml.cs (3)
42[DataType(DataType.Password)] 48[DataType(DataType.Password)] 52[DataType(DataType.Password)]
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (1)
50[DataType(DataType.Text)]
Pages\Account\Manage\SetPassword.cshtml.cs (2)
39[DataType(DataType.Password)] 43[DataType(DataType.Password)]
Pages\Account\Register.cshtml.cs (2)
51[DataType(DataType.Password)] 55[DataType(DataType.Password)]
Pages\Account\ResetPassword.cshtml.cs (2)
36[DataType(DataType.Password)] 39[DataType(DataType.Password)]
IdentitySample.DefaultUI (4)
Areas\Identity\Pages\Account\Manage\Index.cshtml.cs (1)
40[DataType(DataType.Text)]
Areas\Identity\Pages\Account\Register.cshtml.cs (3)
50[DataType(DataType.Password)] 54[DataType(DataType.Password)] 60[DataType(DataType.Text)]
IdentitySample.Mvc (10)
Models\AccountViewModels\LoginViewModel.cs (1)
15[DataType(DataType.Password)]
Models\AccountViewModels\RegisterViewModel.cs (2)
17[DataType(DataType.Password)] 21[DataType(DataType.Password)]
Models\AccountViewModels\ResetPasswordViewModel.cs (2)
16[DataType(DataType.Password)] 19[DataType(DataType.Password)]
Models\ManageViewModels\ChangePasswordViewModel.cs (3)
11[DataType(DataType.Password)] 17[DataType(DataType.Password)] 21[DataType(DataType.Password)]
Models\ManageViewModels\SetPasswordViewModel.cs (2)
12[DataType(DataType.Password)] 16[DataType(DataType.Password)]
Microsoft.AspNetCore.Identity.UI (28)
Areas\Identity\Pages\V4\Account\Login.cshtml.cs (1)
68[DataType(DataType.Password)]
Areas\Identity\Pages\V4\Account\LoginWith2fa.cshtml.cs (1)
52[DataType(DataType.Text)]
Areas\Identity\Pages\V4\Account\LoginWithRecoveryCode.cshtml.cs (1)
46[DataType(DataType.Text)]
Areas\Identity\Pages\V4\Account\Manage\ChangePassword.cshtml.cs (3)
43[DataType(DataType.Password)] 53[DataType(DataType.Password)] 61[DataType(DataType.Password)]
Areas\Identity\Pages\V4\Account\Manage\DeletePersonalData.cshtml.cs (1)
36[DataType(DataType.Password)]
Areas\Identity\Pages\V4\Account\Manage\EnableAuthenticator.cshtml.cs (1)
67[DataType(DataType.Text)]
Areas\Identity\Pages\V4\Account\Manage\SetPassword.cshtml.cs (2)
43[DataType(DataType.Password)] 51[DataType(DataType.Password)]
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (2)
66[DataType(DataType.Password)] 74[DataType(DataType.Password)]
Areas\Identity\Pages\V4\Account\ResetPassword.cshtml.cs (2)
48[DataType(DataType.Password)] 55[DataType(DataType.Password)]
Areas\Identity\Pages\V5\Account\Login.cshtml.cs (1)
68[DataType(DataType.Password)]
Areas\Identity\Pages\V5\Account\LoginWith2fa.cshtml.cs (1)
52[DataType(DataType.Text)]
Areas\Identity\Pages\V5\Account\LoginWithRecoveryCode.cshtml.cs (1)
46[DataType(DataType.Text)]
Areas\Identity\Pages\V5\Account\Manage\ChangePassword.cshtml.cs (3)
43[DataType(DataType.Password)] 53[DataType(DataType.Password)] 61[DataType(DataType.Password)]
Areas\Identity\Pages\V5\Account\Manage\DeletePersonalData.cshtml.cs (1)
36[DataType(DataType.Password)]
Areas\Identity\Pages\V5\Account\Manage\EnableAuthenticator.cshtml.cs (1)
67[DataType(DataType.Text)]
Areas\Identity\Pages\V5\Account\Manage\SetPassword.cshtml.cs (2)
43[DataType(DataType.Password)] 51[DataType(DataType.Password)]
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (2)
66[DataType(DataType.Password)] 74[DataType(DataType.Password)]
Areas\Identity\Pages\V5\Account\ResetPassword.cshtml.cs (2)
48[DataType(DataType.Password)] 55[DataType(DataType.Password)]
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (8)
DataAnnotationsMetadataProviderTest.cs (3)
33{ new DataTypeAttribute(DataType.Duration), d => d.DataTypeName, DataType.Duration.ToString() }, 110var dataType = new DataTypeAttribute(DataType.Currency); 130var dataType = new DataTypeAttribute(DataType.Time); // Has a non-null DisplayFormat.
ModelMetadataProviderTest.cs (5)
179new DataTypeAttribute("value"), metadata => metadata.DataTypeName 269new DataTypeAttribute(DataType.Date), 530var dataType = new DataTypeAttribute(DataType.MultilineText); 548var dataType = new DataTypeAttribute(DataType.Currency); 566var dataType = new DataTypeAttribute(DataType.Currency);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
InputTagHelperTest.cs (8)
2438[DataType(DataType.Date)] 2443[DataType(DataType.Date)] 2450[DataType(DataType.Date)] 2455[DataType(DataType.Date)] 2462[DataType("datetime-local")] 2465[DataType(DataType.Time)] 2468[DataType("month")] 2471[DataType("week")]
RazorPagesWebSite (2)
Pages\CustomModelTypeModel.cshtml.cs (2)
31[DataType(DataType.Password)] 35[DataType(DataType.Password)]
TagHelpersWebSite (2)
Models\Employee.cs (2)
22[DataType(DataType.Date)] 25[DataType(DataType.EmailAddress)]
17 references to DataTypeAttribute
Microsoft.AspNetCore.Mvc.DataAnnotations (10)
DataAnnotationsMetadataProvider.cs (3)
59var dataTypeAttribute = attributes.OfType<DataTypeAttribute>().FirstOrDefault(); 220else if (dataTypeAttribute.GetType() != typeof(DataTypeAttribute))
DataTypeAttributeAdapter.cs (3)
11/// A validation adapter that is used to map <see cref="DataTypeAttribute"/>'s to a single client side validation 14internal sealed class DataTypeAttributeAdapter : AttributeAdapterBase<DataTypeAttribute> 16public DataTypeAttributeAdapter(DataTypeAttribute attribute, string ruleName, IStringLocalizer? stringLocalizer)
ValidationAttributeAdapterProvider.cs (4)
48return new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-creditcard", stringLocalizer); 60return new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-email", stringLocalizer); 64return new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-phone", stringLocalizer); 68return new DataTypeAttributeAdapter((DataTypeAttribute)attribute, "data-val-url", stringLocalizer);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (5)
DataAnnotationsMetadataProviderTest.cs (2)
110var dataType = new DataTypeAttribute(DataType.Currency); 130var dataType = new DataTypeAttribute(DataType.Time); // Has a non-null DisplayFormat.
ModelMetadataProviderTest.cs (3)
530var dataType = new DataTypeAttribute(DataType.MultilineText); 548var dataType = new DataTypeAttribute(DataType.Currency); 566var dataType = new DataTypeAttribute(DataType.Currency);
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\DataType.cs (1)
7/// Enumeration of logical data types that may appear in <see cref="DataTypeAttribute" />
System.ComponentModel.DataAnnotations (1)
System.ComponentModel.DataAnnotations.cs (1)
11[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.DataAnnotations.DataTypeAttribute))]