aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Validation
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-10 02:03:06 +0800
committercrupest <crupest@outlook.com>2021-02-10 02:03:06 +0800
commit4ea535d93753826ec900879560d876cec4d58c38 (patch)
treeb2d94c4347fddf8641fc41caa86826374c9cc241 /BackEnd/Timeline/Models/Validation
parentbf8f849c36bfc42cfd0ef1a66f2adf01dc8e1be7 (diff)
downloadtimeline-4ea535d93753826ec900879560d876cec4d58c38.tar.gz
timeline-4ea535d93753826ec900879560d876cec4d58c38.tar.bz2
timeline-4ea535d93753826ec900879560d876cec4d58c38.zip
...
Diffstat (limited to 'BackEnd/Timeline/Models/Validation')
-rw-r--r--BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs b/BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs
index 483cce06..b65c846c 100644
--- a/BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs
+++ b/BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs
@@ -1,16 +1,17 @@
using System;
+using System.Linq;
namespace Timeline.Models.Validation
{
- public class TimelinePostContentTypeValidator : StringSetValidator
+ public class TimelinePostDataKindValidator : StringSetValidator
{
- public TimelinePostContentTypeValidator() : base(TimelinePostContentTypes.AllTypes) { }
+ public TimelinePostDataKindValidator() : base(TimelinePostDataKind.AllTypes.ToArray()) { }
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
- public class TimelinePostContentTypeAttribute : ValidateWithAttribute
+ public class TimelinePostDataKindAttribute : ValidateWithAttribute
{
- public TimelinePostContentTypeAttribute() : base(typeof(TimelinePostContentTypeValidator))
+ public TimelinePostDataKindAttribute() : base(typeof(TimelinePostDataKindValidator))
{
}