首页 > 编程语言 >asp.net model 校验列表

asp.net model 校验列表

时间:2022-12-16 17:33:46浏览次数:39  
标签:model asp string value field net type CustomValidationAttribute must

[ArgumentIsNullOrWhitespace, The argument '{0}' cannot be null, empty or contain only white space.]
[AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties, 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.]
[AttributeStore_Type_Must_Be_Public, The type '{0}' must be public.]
[AttributeStore_Unknown_Method, The type '{0}' does not contain a public method named '{1}'.]
[AttributeStore_Unknown_Property, The type '{0}' does not contain a public property named '{1}'.]
[Common_NullOrEmpty, Value cannot be null or empty.]
[Common_PropertyNotFound, The property {0}.{1} could not be found.]
[CompareAttribute_MustMatch, '{0}' and '{1}' do not match.]
[CompareAttribute_UnknownProperty, Could not find a property named {0}.]
[CreditCardAttribute_Invalid, The {0} field is not a valid credit card number.]
[CustomValidationAttribute_Method_Must_Return_ValidationResult, The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult. Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success.]
[CustomValidationAttribute_Method_Not_Found, The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static.]
[CustomValidationAttribute_Method_Required, The CustomValidationAttribute.Method was not specified.]
[CustomValidationAttribute_Method_Signature, The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context). The value can be strongly typed. The ValidationContext parameter is optional.]
[CustomValidationAttribute_Type_Conversion_Failed, Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}.]
[CustomValidationAttribute_Type_Must_Be_Public, The custom validation type '{0}' must be public.]
[CustomValidationAttribute_ValidationError, {0} is not valid.]
[CustomValidationAttribute_ValidatorType_Required, The CustomValidationAttribute.ValidatorType was not specified.]
[DataTypeAttribute_EmptyDataTypeString, The custom DataType string cannot be null or empty.]
[DisplayAttribute_PropertyNotSet, The {0} property has not been set. Use the {1} method to get the value.]
[EmailAddressAttribute_Invalid, The {0} field is not a valid e-mail address.]
[EnumDataTypeAttribute_TypeCannotBeNull, The type provided for EnumDataTypeAttribute cannot be null.]
[EnumDataTypeAttribute_TypeNeedsToBeAnEnum, The type '{0}' needs to represent an enumeration type.]
[FileExtensionsAttribute_Invalid, The {0} field only accepts files with the following extensions: {1}]
[LocalizableString_LocalizationFailed, Cannot retrieve property '{0}' because localization failed. Type '{1}' is not public or does not contain a public static string property with the name '{2}'.]
[MaxLengthAttribute_InvalidMaxLength, 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.]
[MaxLengthAttribute_ValidationError, The field {0} must be a string or array type with a maximum length of '{1}'.]
[MetadataTypeAttribute_TypeCannotBeNull, MetadataClassType cannot be null.]
[MinLengthAttribute_InvalidMinLength, MinLengthAttribute must have a Length value that is zero or greater.]
[MinLengthAttribute_ValidationError, The field {0} must be a string or array type with a minimum length of '{1}'.]
[PhoneAttribute_Invalid, The {0} field is not a valid phone number.]
[RangeAttribute_ArbitraryTypeNotIComparable, The type {0} must implement {1}.]
[RangeAttribute_MinGreaterThanMax, The maximum value '{0}' must be greater than or equal to the minimum value '{1}'.]
[RangeAttribute_Must_Set_Min_And_Max, The minimum and maximum values must be set.]
[RangeAttribute_Must_Set_Operand_Type, The OperandType must be set when strings are used for minimum and maximum values.]
[RangeAttribute_ValidationError, The field {0} must be between {1} and {2}.]
[RegexAttribute_ValidationError, The field {0} must match the regular expression '{1}'.]
[RegularExpressionAttribute_Empty_Pattern, The pattern must be set to a valid regular expression.]
[RequiredAttribute_ValidationError, The {0} field is required.]
[StringLengthAttribute_InvalidMaxLength, The maximum length must be a nonnegative integer.]
[StringLengthAttribute_ValidationError, The field {0} must be a string with a maximum length of {1}.]
[StringLengthAttribute_ValidationErrorIncludingMinimum, The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.]
[UIHintImplementation_ControlParameterKeyIsNotAString, The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string.]
[UIHintImplementation_ControlParameterKeyIsNull, The key parameter at position {0} is null. Every key control parameter must be a string.]
[UIHintImplementation_ControlParameterKeyOccursMoreThanOnce, The key parameter at position {0} with value '{1}' occurs more than once.]
[UIHintImplementation_NeedEvenNumberOfControlParameters, The number of control parameters must be even.]
[UrlAttribute_Invalid, The {0} field is not a valid fully-qualified http, https, or ftp URL.]
[ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource, Either ErrorMessageString or ErrorMessageResourceName must be set, but not both.]
[ValidationAttribute_IsValid_NotImplemented, 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).]
[ValidationAttribute_NeedBothResourceTypeAndResourceName, Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute.]
[ValidationAttribute_ResourcePropertyNotStringType, The property '{0}' on resource type '{1}' is not a string type.]
[ValidationAttribute_ResourceTypeDoesNotHaveProperty, The resource type '{0}' does not have an accessible static property named '{1}'.]
[ValidationAttribute_ValidationError, The field {0} is invalid.]
[ValidationContext_Must_Be_Method, The ValidationContext for the type '{0}', member name '{1}' must provide the MethodInfo.]
[ValidationContextServiceContainer_ItemAlreadyExists, A service of type '{0}' already exists in the container.]
[Validator_InstanceMustMatchValidationContextInstance, The instance provided must match the ObjectInstance on the ValidationContext supplied.]
[Validator_Property_Value_Wrong_Type, The value for property '{0}' must be of type '{1}'.]

标签:model,asp,string,value,field,net,type,CustomValidationAttribute,must
From: https://www.cnblogs.com/renfeng/p/16987919.html

相关文章

  • Asp.Net上传文件示例(保存文件路径到数据库)
    把下面的代码保存为Upload.aspx即可运行(事先在同目录下建立一个Upload文件夹保存上传的文件,再建立一个数据库、表Upload,字段ID:自动编号,FilePath:文本型):<%@ImportName......
  • 动态载入树 (ASP+数据库)
    ASP+ACCESS在数据量达100万条记录下,载入速度仍然惊人....//网上转载.忘了作者... :)//********************** Index.asp************************//1<%@LAN......
  • asp.net发送邮件
    1.SMTP邮件传输协议 SMTP的全称是“SimpleMailTransferProtocol”,即简单邮件传输协议。它是一组用于从源地址到目的地址传输邮件的规范,通过它来控制邮件的中转方式。SMT......
  • [C#] Asp.net Core SignalR 跨域设置
    参考:https://blog.csdn.net/hefeng_aspnet/article/details/117777995?spm=1001.2101.3001.6650.5&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7E......
  • Qt5.15-windows安装(解决Network error while downloading问题)
    ​​文章目录​​1项目场景:​​​​2问题描述:​​​​3原因分析:​​​​4解决方案:​​​​4.1下载fiddlereverywhere以及qt在线下载器​​​​4.2在fiddlereverywh......
  • Oracle的网络三大配置文件sqlnet.ora、tnsnames.ora、listener.ora
    1.说明为了使得外部进程能够访问Oracle 数据库则必须配置Oracle 网络服务器环境配置, Oracle 网络服务器环境是通过配置listener.ora、sqlnet.ora 和 tnsnames.ora ......
  • difference between send() and sendTo() in C for a UDP network implementation
    Thesendtofunctionistheonethat'sgenerallyusedforUDPsockets.AsUDPisconnectionless,thisfunctionallowsyoutospecifytheIPandportthateach......
  • .Net framework 配置swagger
    .Netframework配置swagger1、先添加Swashbuckle管理NuGet包 2、在生成文件里面点击XML文档文件、跟在取消显示警告里面添加1591;  3、在App_Start=》SwaggerCo......
  • 基于AgileConfig基于.NetCore的配置应用
    这是一个基于.netcore开发的轻量级配置中心。部署简单,最少只需要一个数据节点,支持docker部署支持多节点分布式部署来保证高可用配置支持按应用隔离,应用内配置支持分组......
  • 时间序列-预测-模型-2021:SCINet
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......