3 instantiations of RequiredAttribute
System.Web (1)
ModelBinding\DataAnnotationsModelValidatorProvider.cs (1)
90attributes = attributes.Concat(new[] { new RequiredAttribute() });
System.Web.DynamicData (2)
DynamicData\FieldTemplateUserControl.cs (1)
22private static RequiredAttribute s_defaultRequiredAttribute = new RequiredAttribute();
DynamicData\ModelProviders\ColumnProvider.cs (1)
59extraAttributes.Add(new RequiredAttribute());
39 references to RequiredAttribute
System.ComponentModel.DataAnnotations (21)
DataAnnotations\MaxLengthAttribute.cs (1)
49/// It is assumed the <see cref = "RequiredAttribute" /> is used if the value may not be null.
DataAnnotations\MinLengthAttribute.cs (1)
34/// It is assumed the <see cref = "RequiredAttribute" /> is used if the value may not be null.
DataAnnotations\RequiredAttribute.cs (1)
28/// <returns><c>false</c> if the <paramref name="value"/> is null or an empty string. If <see cref="RequiredAttribute.AllowEmptyStrings"/>
DataAnnotations\StringLengthAttribute.cs (1)
41/// It is assumed the <see cref="RequiredAttribute"/> is used if the value may not be null.</remarks>
DataAnnotations\Validator.cs (17)
24/// If there is a <see cref="RequiredAttribute"/> found on the property, it will be evaluated before all other 29/// If <paramref name="validationResults"/> is null and there isn't a <see cref="RequiredAttribute"/> failure, 67/// checks to ensure all properties marked with <see cref="RequiredAttribute"/> are set. It does not validate the 91/// checks to ensure all properties marked with <see cref="RequiredAttribute"/> are set. If <paramref name="validateAllProperties"/> 100/// For any given property, if it has a <see cref="RequiredAttribute"/> that fails validation, no other validators 144/// If there is a <see cref="RequiredAttribute"/> within the <paramref name="validationAttributes"/>, it will 150/// If <paramref name="validationResults"/> is null and there isn't a <see cref="RequiredAttribute"/> failure, 250/// A <see cref="RequiredAttribute"/> within the <paramref name="validationAttributes"/> will always be evaluated first. 384/// ones marked with <see cref="RequiredAttribute"/> are not null.</param> 400RequiredAttribute reqAttr = attributes.FirstOrDefault(a => a is RequiredAttribute) as RequiredAttribute; 462/// If a <see cref="RequiredAttribute"/> is found, it will be evaluated first, and if that fails, 469/// <see cref="RequiredAttribute"/> failure will always abort with that sole failure.</param> 481RequiredAttribute required = attributes.FirstOrDefault(a => a is RequiredAttribute) as RequiredAttribute;
System.Web (8)
ModelBinding\DataAnnotationsModelMetadataProvider.cs (2)
94RequiredAttribute requiredAttribute = attributeList.OfType<RequiredAttribute>().FirstOrDefault();
ModelBinding\DataAnnotationsModelValidator.cs (1)
48return Attribute is RequiredAttribute;
ModelBinding\DataAnnotationsModelValidatorProvider.cs (3)
46typeof(RequiredAttribute), 47(metadata, context, attribute) => new RequiredAttributeAdapter(metadata, context, (RequiredAttribute)attribute) 89!attributes.Any(a => a is RequiredAttribute)) {
ModelBinding\RequiredAttributeAdapter.cs (2)
4public sealed class RequiredAttributeAdapter : DataAnnotationsModelValidator<RequiredAttribute> { 5public RequiredAttributeAdapter(ModelMetadata metadata, ModelBindingExecutionContext context, RequiredAttribute attribute)
System.Web.DynamicData (10)
DynamicData\FieldTemplateUserControl.cs (4)
22private static RequiredAttribute s_defaultRequiredAttribute = new RequiredAttribute(); 422var requiredAttribute = column.Metadata.RequiredAttribute; 429IgnoreModelValidationAttribute(typeof(RequiredAttribute)); 434IgnoreModelValidationAttribute(typeof(RequiredAttribute));
DynamicData\MetaColumn.cs (4)
252var requiredAttribute = Metadata.RequiredAttribute; 525RequiredAttribute RequiredAttribute { get; } 554RequiredAttribute = Attributes.FirstOrDefault<RequiredAttribute>(); 630public RequiredAttribute RequiredAttribute { get; private set; }
DynamicData\ModelProviders\ColumnProvider.cs (2)
57var requiredAttribute = attributes.FirstOrDefault<RequiredAttribute>();