96 references to SR
System.ComponentModel.Annotations (96)
System\ComponentModel\DataAnnotations\AllowedValuesAttribute.cs (1)
24DefaultErrorMessage = SR.AllowedValuesAttribute_Invalid;
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (2)
162throw new InvalidOperationException(SR.Format(SR.AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties,
System\ComponentModel\DataAnnotations\Base64StringAttribute.cs (1)
25DefaultErrorMessage = SR.Base64StringAttribute_Invalid;
System\ComponentModel\DataAnnotations\CompareAttribute.cs (5)
15public CompareAttribute(string otherProperty) : base(SR.CompareAttribute_MustMatch) 41return new ValidationResult(SR.Format(SR.CompareAttribute_UnknownProperty, OtherProperty)); 45throw new ArgumentException(SR.Format(SR.Common_PropertyNotFound, validationContext.ObjectType.FullName, OtherProperty));
System\ComponentModel\DataAnnotations\CreditCardAttribute.cs (1)
14DefaultErrorMessage = SR.CreditCardAttribute_Invalid;
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (15)
88: base(() => SR.CustomValidationAttribute_ValidationError) 150return new ValidationResult(SR.Format(SR.CustomValidationAttribute_Type_Conversion_Failed, 221return SR.CustomValidationAttribute_ValidatorType_Required; 226return SR.Format(SR.CustomValidationAttribute_Type_Must_Be_Public, ValidatorType.Name); 240return SR.CustomValidationAttribute_Method_Required; 248return SR.Format(SR.CustomValidationAttribute_Method_Not_Found, Method, ValidatorType.Name); 254return SR.Format(SR.CustomValidationAttribute_Method_Must_Return_ValidationResult, Method, ValidatorType.Name); 262return SR.Format(SR.CustomValidationAttribute_Method_Signature, Method, ValidatorType.Name); 274return SR.Format(SR.CustomValidationAttribute_Method_Signature, Method, ValidatorType.Name);
System\ComponentModel\DataAnnotations\DataTypeAttribute.cs (1)
119throw new InvalidOperationException(SR.DataTypeAttribute_EmptyDataTypeString);
System\ComponentModel\DataAnnotations\DeniedValuesAttribute.cs (1)
24DefaultErrorMessage = SR.DeniedValuesAttribute_Invalid;
System\ComponentModel\DataAnnotations\DisplayAttribute.cs (6)
210throw new InvalidOperationException(SR.Format(SR.DisplayAttribute_PropertyNotSet, 239throw new InvalidOperationException(SR.Format(SR.DisplayAttribute_PropertyNotSet, 267throw new InvalidOperationException(SR.Format(SR.DisplayAttribute_PropertyNotSet,
System\ComponentModel\DataAnnotations\EmailAddressAttribute.cs (1)
15DefaultErrorMessage = SR.EmailAddressAttribute_Invalid;
System\ComponentModel\DataAnnotations\EnumDataTypeAttribute.cs (3)
26throw new InvalidOperationException(SR.EnumDataTypeAttribute_TypeCannotBeNull); 30throw new InvalidOperationException(SR.Format(SR.EnumDataTypeAttribute_TypeNeedsToBeAnEnum, EnumType.FullName));
System\ComponentModel\DataAnnotations\FileExtensionsAttribute.cs (1)
22DefaultErrorMessage = SR.FileExtensionsAttribute_Invalid;
System\ComponentModel\DataAnnotations\LengthAttribute.cs (5)
17: base(SR.LengthAttribute_ValidationError) 67throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType())); 90throw new InvalidOperationException(SR.LengthAttribute_InvalidMinLength); 95throw new InvalidOperationException(SR.LengthAttribute_InvalidMaxLength);
System\ComponentModel\DataAnnotations\LocalizableString.cs (2)
151string exceptionMessage = SR.Format(SR.LocalizableString_LocalizationFailed, _propertyName, _resourceType.FullName, _propertyValue);
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (4)
51private static string DefaultErrorMessageString => SR.MaxLengthAttribute_ValidationError; 84throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType())); 107throw new InvalidOperationException(SR.MaxLengthAttribute_InvalidMaxLength);
System\ComponentModel\DataAnnotations\MetadataTypeAttribute.cs (1)
39throw new InvalidOperationException(SR.MetadataTypeAttribute_TypeCannotBeNull);
System\ComponentModel\DataAnnotations\MinLengthAttribute.cs (4)
25: base(SR.MinLengthAttribute_ValidationError) 67throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType())); 90throw new InvalidOperationException(SR.MinLengthAttribute_InvalidMinLength);
System\ComponentModel\DataAnnotations\PhoneAttribute.cs (1)
20DefaultErrorMessage = SR.PhoneAttribute_Invalid;
System\ComponentModel\DataAnnotations\RangeAttribute.cs (11)
113throw new InvalidOperationException(SR.Format(SR.RangeAttribute_MinGreaterThanMax, maximum, minimum)); 117throw new InvalidOperationException(SR.RangeAttribute_CannotUseExclusiveBoundsWhenTheyAreEqual); 200throw new InvalidOperationException(SR.RangeAttribute_Must_Set_Min_And_Max); 222throw new InvalidOperationException(SR.RangeAttribute_Must_Set_Operand_Type); 227throw new InvalidOperationException(SR.Format(SR.RangeAttribute_ArbitraryTypeNotIComparable, 266(false, false) => SR.RangeAttribute_ValidationError, 267(true, false) => SR.RangeAttribute_ValidationError_MinExclusive, 268(false, true) => SR.RangeAttribute_ValidationError_MaxExclusive, 269(true, true) => SR.RangeAttribute_ValidationError_MinExclusive_MaxExclusive,
System\ComponentModel\DataAnnotations\RegularExpressionAttribute.cs (2)
22: base(() => SR.RegexAttribute_ValidationError) 109SR.RegularExpressionAttribute_Empty_Pattern);
System\ComponentModel\DataAnnotations\RequiredAttribute.cs (1)
21: base(() => SR.RequiredAttribute_ValidationError)
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (5)
20: base(() => SR.StringLengthAttribute_ValidationError) 73? SR.StringLengthAttribute_ValidationErrorIncludingMinimum 88throw new InvalidOperationException(SR.StringLengthAttribute_InvalidMaxLength); 93throw new InvalidOperationException(SR.Format(SR.RangeAttribute_MinGreaterThanMax, MaximumLength, MinimumLength));
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (7)
174throw new InvalidOperationException(SR.UIHintImplementation_NeedEvenNumberOfControlParameters); 183throw new InvalidOperationException(SR.Format(SR.UIHintImplementation_ControlParameterKeyIsNull, i)); 188throw new InvalidOperationException(SR.Format(SR.UIHintImplementation_ControlParameterKeyIsNotAString, 195throw new InvalidOperationException(SR.Format(SR.UIHintImplementation_ControlParameterKeyOccursMoreThanOnce,
System\ComponentModel\DataAnnotations\UrlAttribute.cs (1)
15DefaultErrorMessage = SR.UrlAttribute_Invalid;
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (8)
46: this(() => SR.ValidationAttribute_ValidationError) 237SR.ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource); 244SR.ValidationAttribute_NeedBothResourceTypeAndResourceName); 283throw new InvalidOperationException(SR.Format(SR.ValidationAttribute_ResourceTypeDoesNotHaveProperty, 290throw new InvalidOperationException(SR.Format(SR.ValidationAttribute_ResourcePropertyNotStringType, 395SR.ValidationAttribute_IsValid_NotImplemented);
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (2)
184throw new ArgumentException(SR.Format(SR.AttributeStore_Unknown_Property, _type.Name, propertyName),
System\ComponentModel\DataAnnotations\Validator.cs (4)
140throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 284throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 380throw new ArgumentException(SR.Format(SR.Validator_Property_Value_Wrong_Type, propertyName, propertyType),