| | |
| | | /// </summary> |
| | | public string[] NotNullAndEmptyWithPropertyAndValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 说æ |
| | | /// </summary> |
| | | public string Description { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ£æ¥çº¦æï¼å±æ§å¼åªå
è®¸æ¯æ°ç»ä¸çå¼ |
| | | /// </summary> |
| | | public object[] Check { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 以...å¼å¤´ |
| | | /// </summary> |
| | | public string StartWith { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 以...ç»å°¾ |
| | | /// </summary> |
| | | public string EndWith { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå°é¿åº¦ |
| | | /// </summary> |
| | | public int MinLength { get; set; } = 0; |
| | | |
| | | /// <summary> |
| | | /// æå¤§é¿åº¦ |
| | | /// </summary> |
| | | public int MaxLength { get; set; } = int.MaxValue; |
| | | |
| | | public PropertyValidateAttribute(string description) |
| | | { |
| | |
| | | { |
| | | public ModelValidateType ModelValidateType { get; } = ModelValidateType.SimpleValidate; |
| | | |
| | | public Func<object, (bool, string, object?)> CustomValidateMethod { get; set; } |
| | | |
| | | public ModelValidateAttribute() |
| | | { |
| | | } |
| | | |
| | | public ModelValidateAttribute(Func<object, (bool, string, object?)> customValidateMethod) |
| | | { |
| | | CustomValidateMethod = customValidateMethod; |
| | | } |
| | | } |
| | | |
| | | public enum ModelValidateType |