|
| 1 | +namespace XLocalizer.DataAnnotations |
| 2 | +{ |
| 3 | + /// <summary> |
| 4 | + /// Interface to provide custom default data annotation error messages. |
| 5 | + /// Messages can be provided in any culture, so user can provide localized error messages here, |
| 6 | + /// but the default request culture in startup must be configured same as messages culture. |
| 7 | + /// </summary> |
| 8 | + public interface IDataAnnotationsMessagesProvider |
| 9 | + { |
| 10 | + /// <summary> |
| 11 | + /// The argument '{0}' cannot be null, empty or contain only whitespace. |
| 12 | + /// </summary> |
| 13 | + string ArgumentIsNullOrWhitespace { get; } |
| 14 | + |
| 15 | + /// <summary> |
| 16 | + /// The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type. |
| 17 | + /// </summary> |
| 18 | + string AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties { get; } |
| 19 | + |
| 20 | + /// <summary> |
| 21 | + /// The type '{0}' does not contain a property named '{1}'. |
| 22 | + /// </summary> |
| 23 | + string AttributeStore_Unknown_Property { get; } |
| 24 | + |
| 25 | + /// <summary> |
| 26 | + /// The property {0}.{1} could not be found. |
| 27 | + /// </summary> |
| 28 | + string Common_PropertyNotFound { get; } |
| 29 | + |
| 30 | + /// <summary> |
| 31 | + /// '{0}' and '{1}' do not match. |
| 32 | + /// </summary> |
| 33 | + string CompareAttribute_MustMatch { get; } |
| 34 | + |
| 35 | + /// <summary> |
| 36 | + /// Could not find a property named {0}. |
| 37 | + /// </summary> |
| 38 | + string CompareAttribute_UnknownProperty { get; } |
| 39 | + |
| 40 | + /// <summary> |
| 41 | + /// The {0} field is not a valid credit card number. |
| 42 | + /// </summary> |
| 43 | + string CreditCardAttribute_Invalid { get; } |
| 44 | + |
| 45 | + /// <summary> |
| 46 | + /// Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}. |
| 47 | + /// </summary> |
| 48 | + string CustomValidationAttribute_Type_Conversion_Failed { get; } |
| 49 | + |
| 50 | + /// <summary> |
| 51 | + /// The custom validation type '{0}' must be public. |
| 52 | + /// </summary> |
| 53 | + string CustomValidationAttribute_Type_Must_Be_Public { get; } |
| 54 | + |
| 55 | + /// <summary> |
| 56 | + /// {0} is not valid. |
| 57 | + /// </summary> |
| 58 | + string CustomValidationAttribute_ValidationError { get; } |
| 59 | + |
| 60 | + /// <summary> |
| 61 | + /// The custom DataType string cannot be null or empty. |
| 62 | + /// </summary> |
| 63 | + string DataTypeAttribute_EmptyDataTypeString { get; } |
| 64 | + |
| 65 | + /// <summary> |
| 66 | + /// The {0} property has not been set. Use the {1} method to get the value. |
| 67 | + /// </summary> |
| 68 | + string DisplayAttribute_PropertyNotSet { get; } |
| 69 | + |
| 70 | + /// <summary> |
| 71 | + /// The {0} field is not a valid e-mail address. |
| 72 | + /// </summary> |
| 73 | + string EmailAddressAttribute_Invalid { get; } |
| 74 | + |
| 75 | + /// <summary> |
| 76 | + /// The type provided for EnumDataTypeAttribute cannot be null. |
| 77 | + /// </summary> |
| 78 | + string EnumDataTypeAttribute_TypeCannotBeNull { get; } |
| 79 | + |
| 80 | + /// <summary> |
| 81 | + /// The type '{0}' needs to represent an enumeration type. |
| 82 | + /// </summary> |
| 83 | + string EnumDataTypeAttribute_TypeNeedsToBeAnEnum { get; } |
| 84 | + |
| 85 | + /// <summary> |
| 86 | + /// The {0} field only accepts files with the following extensions: {1} |
| 87 | + /// </summary> |
| 88 | + string FileExtensionsAttribute_Invalid { get; } |
| 89 | + |
| 90 | + /// <summary> |
| 91 | + /// The field of type {0} must be a string, array or ICollection type. |
| 92 | + /// </summary> |
| 93 | + string LengthAttribute_InvalidValueType { get; } |
| 94 | + |
| 95 | + |
| 96 | + /// <summary> |
| 97 | + /// MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length. |
| 98 | + /// </summary> |
| 99 | + string MaxLengthAttribute_InvalidMaxLength { get; } |
| 100 | + |
| 101 | + /// <summary> |
| 102 | + /// The field {0} must be a string or array type with a maximum length of '{1}'. |
| 103 | + /// </summary> |
| 104 | + string MaxLengthAttribute_ValidationError { get; } |
| 105 | + |
| 106 | + /// <summary> |
| 107 | + /// MetadataClassType cannot be null. |
| 108 | + /// </summary> |
| 109 | + string MetadataTypeAttribute_TypeCannotBeNull { get; } |
| 110 | + |
| 111 | + /// <summary> |
| 112 | + /// MinLengthAttribute must have a Length value that is zero or greater. |
| 113 | + /// </summary> |
| 114 | + string MinLengthAttribute_InvalidMinLength { get; } |
| 115 | + |
| 116 | + /// <summary> |
| 117 | + /// The field {0} must be a string or array type with a minimum length of '{1}'. |
| 118 | + /// </summary> |
| 119 | + string MinLengthAttribute_ValidationError { get; } |
| 120 | + |
| 121 | + /// <summary> |
| 122 | + /// The {0} field is not a valid phone number. |
| 123 | + /// </summary> |
| 124 | + string PhoneAttribute_Invalid { get; } |
| 125 | + |
| 126 | + /// <summary> |
| 127 | + /// The type {0} must implement {1}. |
| 128 | + /// </summary> |
| 129 | + string RangeAttribute_ArbitraryTypeNotIComparable { get; } |
| 130 | + |
| 131 | + /// <summary> |
| 132 | + /// The maximum value '{0}' must be greater than or equal to the minimum value '{1}'. |
| 133 | + /// </summary> |
| 134 | + string RangeAttribute_MinGreaterThanMax { get; } |
| 135 | + |
| 136 | + /// <summary> |
| 137 | + /// The minimum and maximum values must be set. |
| 138 | + /// </summary> |
| 139 | + string RangeAttribute_Must_Set_Min_And_Max { get; } |
| 140 | + |
| 141 | + /// <summary> |
| 142 | + /// The OperandType must be set when strings are used for minimum and maximum values. |
| 143 | + /// </summary> |
| 144 | + string RangeAttribute_Must_Set_Operand_Type { get; } |
| 145 | + |
| 146 | + /// <summary> |
| 147 | + /// The field {0} must be between {1} and {2}. |
| 148 | + /// </summary> |
| 149 | + string RangeAttribute_ValidationError { get; } |
| 150 | + |
| 151 | + /// <summary> |
| 152 | + /// The field {0} must match the regular expression '{1}'. |
| 153 | + /// </summary> |
| 154 | + string RegexAttribute_ValidationError { get; } |
| 155 | + |
| 156 | + /// <summary> |
| 157 | + /// The pattern must be set to a valid regular expression. |
| 158 | + /// </summary> |
| 159 | + string RegularExpressionAttribute_Empty_Pattern { get; } |
| 160 | + |
| 161 | + /// <summary> |
| 162 | + /// The {0} field is required. |
| 163 | + /// </summary> |
| 164 | + string RequiredAttribute_ValidationError { get; } |
| 165 | + |
| 166 | + /// <summary> |
| 167 | + /// The maximum length must be a nonnegative integer. |
| 168 | + /// </summary> |
| 169 | + string StringLengthAttribute_InvalidMaxLength { get; } |
| 170 | + |
| 171 | + /// <summary> |
| 172 | + /// The field {0} must be a string with a maximum length of {1}. |
| 173 | + /// </summary> |
| 174 | + string StringLengthAttribute_ValidationError { get; } |
| 175 | + |
| 176 | + /// <summary> |
| 177 | + /// The field {0} must be a string with a minimum length of {2} and a maximum length of {1}. |
| 178 | + /// </summary> |
| 179 | + string StringLengthAttribute_ValidationErrorIncludingMinimum { get; } |
| 180 | + |
| 181 | + /// <summary> |
| 182 | + /// The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string. |
| 183 | + /// </summary> |
| 184 | + string UIHintImplementation_ControlParameterKeyIsNotAString { get; } |
| 185 | + |
| 186 | + /// <summary> |
| 187 | + /// The key parameter at position {0} is null. Every key control parameter must be a string. |
| 188 | + /// </summary> |
| 189 | + string UIHintImplementation_ControlParameterKeyIsNull { get; } |
| 190 | + |
| 191 | + /// <summary> |
| 192 | + /// The key parameter at position {0} with value '{1}' occurs more than once. |
| 193 | + /// </summary> |
| 194 | + string UIHintImplementation_ControlParameterKeyOccursMoreThanOnce { get; } |
| 195 | + |
| 196 | + /// <summary> |
| 197 | + /// The number of control parameters must be even. |
| 198 | + /// </summary> |
| 199 | + string UIHintImplementation_NeedEvenNumberOfControlParameters { get; } |
| 200 | + |
| 201 | + /// <summary> |
| 202 | + /// The {0} field is not a valid fully-qualified http, https, or ftp URL. |
| 203 | + /// </summary> |
| 204 | + string UrlAttribute_Invalid { get; } |
| 205 | + |
| 206 | + /// <summary> |
| 207 | + /// Either ErrorMessageString or ErrorMessageResourceName must be set, but not both. |
| 208 | + /// </summary> |
| 209 | + string ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource { get; } |
| 210 | + |
| 211 | + /// <summary> |
| 212 | + /// IsValid(object value) has not been implemented by this class. The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context). |
| 213 | + /// </summary> |
| 214 | + string ValidationAttribute_IsValid_NotImplemented { get; } |
| 215 | + |
| 216 | + /// <summary> |
| 217 | + /// Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute. |
| 218 | + /// </summary> |
| 219 | + string ValidationAttribute_NeedBothResourceTypeAndResourceName { get; } |
| 220 | + |
| 221 | + /// <summary> |
| 222 | + /// The property '{0}' on resource type '{1}' is not a string type. |
| 223 | + /// </summary> |
| 224 | + string ValidationAttribute_ResourcePropertyNotStringType { get; } |
| 225 | + |
| 226 | + /// <summary> |
| 227 | + /// The resource type '{0}' does not have an accessible static property named '{1}'. |
| 228 | + /// </summary> |
| 229 | + string ValidationAttribute_ResourceTypeDoesNotHaveProperty { get; } |
| 230 | + |
| 231 | + /// <summary> |
| 232 | + /// The field {0} is invalid. |
| 233 | + /// </summary> |
| 234 | + string ValidationAttribute_ValidationError { get; } |
| 235 | + |
| 236 | + /// <summary> |
| 237 | + /// The instance provided must match the ObjectInstance on the ValidationContext supplied. |
| 238 | + /// </summary> |
| 239 | + string Validator_InstanceMustMatchValidationContextInstance { get; } |
| 240 | + |
| 241 | + /// <summary> |
| 242 | + /// The value for property '{0}' must be of type '{1}'. |
| 243 | + /// </summary> |
| 244 | + string Validator_Property_Value_Wrong_Type { get; } |
| 245 | + } |
| 246 | +} |
0 commit comments