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
commit253b06dfaa091d986a8714c081fd1e01679f538a (patch)
tree9200a7f6607889fcfb13b7ba14cc30db54fe3499 /BackEnd/Timeline/Models/Validation
parentbc2d6676276ea85a974f57f96b038e35e6ce7460 (diff)
downloadtimeline-253b06dfaa091d986a8714c081fd1e01679f538a.tar.gz
timeline-253b06dfaa091d986a8714c081fd1e01679f538a.tar.bz2
timeline-253b06dfaa091d986a8714c081fd1e01679f538a.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))
{
}