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 | d42d826ae863b20913321d229a168b05d723db73 (patch) | |
| tree | 51831c60b08fabe9c83ce6ac3dbf1498310b9831 /BackEnd/Timeline/Models/Validation | |
| parent | 66658abde1220a53d0e022aaac8dd49a15034a34 (diff) | |
| download | timeline-d42d826ae863b20913321d229a168b05d723db73.tar.gz timeline-d42d826ae863b20913321d229a168b05d723db73.tar.bz2 timeline-d42d826ae863b20913321d229a168b05d723db73.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))
+ {
+
+ }
+ }
+}
|
