From 3fc0cd57711b41e3a65e24e30ceaa3f95d7d4415 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 12 Apr 2022 17:36:34 +0800 Subject: ... --- .../Timeline/Models/Validation/PositiveIntegerAttribute.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 BackEnd/Timeline/Models/Validation/PositiveIntegerAttribute.cs (limited to 'BackEnd/Timeline/Models') 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) + { + } + } +} + -- cgit v1.2.3