From 0705cb6170a9ba77ba48bbb6dcebb9cf3d73cbea Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 14 十月 2025 02:12:25 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/ModelValidateAttribute.cs | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/ModelValidateAttribute.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/ModelValidateAttribute.cs"
index 5e742ef..0f8b12b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/ModelValidateAttribute.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/ModelValidateAttribute.cs"
@@ -44,7 +44,35 @@
/// </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)
{
@@ -58,9 +86,18 @@
{
public ModelValidateType ModelValidateType { get; } = ModelValidateType.SimpleValidate;
+ public Func<object, (bool, string, object?)> CustomValidateMethod { get; set; }
+
+ public object ErrorResponse { get; set; }
+
public ModelValidateAttribute()
{
}
+
+ public ModelValidateAttribute(Func<object, (bool, string, object?)> customValidateMethod)
+ {
+ CustomValidateMethod = customValidateMethod;
+ }
}
public enum ModelValidateType
--
Gitblit v1.9.3