aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Validation/PositiveIntegerAttribute.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-04-12 17:36:34 +0800
committercrupest <crupest@outlook.com>2022-04-12 17:36:34 +0800
commit3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415 (patch)
treecf694d961ed67329d7b040db3f64fa72469dd827 /BackEnd/Timeline/Models/Validation/PositiveIntegerAttribute.cs
parentda0f0abb3d5b2941e2e7c545ec8faf681c26e72a (diff)
downloadtimeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.tar.gz
timeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.tar.bz2
timeline-3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415.zip
...
Diffstat (limited to 'BackEnd/Timeline/Models/Validation/PositiveIntegerAttribute.cs')
-rw-r--r--BackEnd/Timeline/Models/Validation/PositiveIntegerAttribute.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Models/Validation/PositiveIntegerAttribute.cs b/BackEnd/Timeline/Models/Validation/PositiveIntegerAttribute.cs
new file mode 100644
index 00000000..78e2f0b4
--- /dev/null
+++ b/BackEnd/Timeline/Models/Validation/PositiveIntegerAttribute.cs
@@ -0,0 +1,12 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Timeline.Models.Validation
+{
+ public class PositiveIntegerAttribute : RangeAttribute
+ {
+ public PositiveIntegerAttribute() : base(1, int.MaxValue)
+ {
+ }
+ }
+}
+