aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models/Validation/TimelineNameValidator.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-02-02 14:35:30 +0800
committercrupest <crupest@outlook.com>2020-02-02 14:35:30 +0800
commitcb18564275735da0614be39371e2e3e7f5467e88 (patch)
tree06388f533584b06a185c5908603423af158f671a /Timeline/Models/Validation/TimelineNameValidator.cs
parent9e84b1e9ad1f2a45cd3e09759c69989fdc588c3d (diff)
downloadtimeline-cb18564275735da0614be39371e2e3e7f5467e88.tar.gz
timeline-cb18564275735da0614be39371e2e3e7f5467e88.tar.bz2
timeline-cb18564275735da0614be39371e2e3e7f5467e88.zip
Add timeline service.
Diffstat (limited to 'Timeline/Models/Validation/TimelineNameValidator.cs')
-rw-r--r--Timeline/Models/Validation/TimelineNameValidator.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Timeline/Models/Validation/TimelineNameValidator.cs b/Timeline/Models/Validation/TimelineNameValidator.cs
new file mode 100644
index 00000000..f1ab54e8
--- /dev/null
+++ b/Timeline/Models/Validation/TimelineNameValidator.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace Timeline.Models.Validation
+{
+ public class TimelineNameValidator : NameValidator
+ {
+ }
+
+ [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter,
+ AllowMultiple = false)]
+ public class TimelineNameAttribute : ValidateWithAttribute
+ {
+ public TimelineNameAttribute()
+ : base(typeof(TimelineNameValidator))
+ {
+
+ }
+ }
+}