diff options
| author | crupest <crupest@outlook.com> | 2021-02-08 21:40:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-08 21:40:18 +0800 |
| commit | 7978a4c8597a152e002516692fedb182a18fcae1 (patch) | |
| tree | e021e03cd42eee6fa60b2f9a9d88bd9d2a30df9c /BackEnd/Timeline/Models/Validation | |
| parent | dfbcc4bbbd032ea648b4f42b66080fc0b0261ab3 (diff) | |
| parent | 391f82e85d4a31f4a5022a24062083f00d16b3c8 (diff) | |
| download | timeline-7978a4c8597a152e002516692fedb182a18fcae1.tar.gz timeline-7978a4c8597a152e002516692fedb182a18fcae1.tar.bz2 timeline-7978a4c8597a152e002516692fedb182a18fcae1.zip | |
Merge pull request #245 from crupest/post
Backend: post get and patch.
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))
+ {
+
+ }
+ }
+}
|
