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
commitb9dc0062241f4dcf5221808d97a7e4c337a8b6cc (patch)
tree06388f533584b06a185c5908603423af158f671a /Timeline/Models/Validation/TimelineNameValidator.cs
parente71cb8e368d081747014f1434c5ee157660783f2 (diff)
downloadtimeline-b9dc0062241f4dcf5221808d97a7e4c337a8b6cc.tar.gz
timeline-b9dc0062241f4dcf5221808d97a7e4c337a8b6cc.tar.bz2
timeline-b9dc0062241f4dcf5221808d97a7e4c337a8b6cc.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))
+ {
+
+ }
+ }
+}