From 2510ff614cd2962d2a91ec1a9eb6668009e9b671 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期四, 12 十二月 2024 10:43:35 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/ModelValidateAttribute.cs |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 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..d32fa8d 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,16 @@
     {
         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

--
Gitblit v1.9.3