diff options
author | crupest <crupest@outlook.com> | 2021-02-06 16:41:19 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-06 16:41:19 +0800 |
commit | 3591f59453846e235ce77e15adde6092dbbedac3 (patch) | |
tree | 3663c6da19945d9514f040c53205f037b49ec998 /BackEnd/Timeline/Models/Validation | |
parent | c987364ce795c7f4fe837ad8c2a685558c25b0b5 (diff) | |
download | timeline-3591f59453846e235ce77e15adde6092dbbedac3.tar.gz timeline-3591f59453846e235ce77e15adde6092dbbedac3.tar.bz2 timeline-3591f59453846e235ce77e15adde6092dbbedac3.zip |
...
Diffstat (limited to 'BackEnd/Timeline/Models/Validation')
-rw-r--r-- | BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs b/BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs new file mode 100644 index 00000000..483cce06 --- /dev/null +++ b/BackEnd/Timeline/Models/Validation/TimelinePostContentTypeValidator.cs @@ -0,0 +1,18 @@ +using System;
+
+namespace Timeline.Models.Validation
+{
+ public class TimelinePostContentTypeValidator : StringSetValidator
+ {
+ public TimelinePostContentTypeValidator() : base(TimelinePostContentTypes.AllTypes) { }
+ }
+
+ [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
+ public class TimelinePostContentTypeAttribute : ValidateWithAttribute
+ {
+ public TimelinePostContentTypeAttribute() : base(typeof(TimelinePostContentTypeValidator))
+ {
+
+ }
+ }
+}
|