From 82c0215b9743c8cc7e90a054b6cff9fb8f6cebe7 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 31 May 2017 18:41:36 -0400 Subject: User-submitted quotes. --- Project-Unite/Models/IdentityModels.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Project-Unite/Models/IdentityModels.cs') diff --git a/Project-Unite/Models/IdentityModels.cs b/Project-Unite/Models/IdentityModels.cs index 3b534ec..6783e7c 100644 --- a/Project-Unite/Models/IdentityModels.cs +++ b/Project-Unite/Models/IdentityModels.cs @@ -228,10 +228,20 @@ namespace Project_Unite.Models public class Quote { public string Id { get; set; } + + [Required(ErrorMessage ="Your quote must have an author name.", AllowEmptyStrings =false)] + [MaxLength(50, ErrorMessage ="Your author name must not exceed 50 characters.")] public string AuthorId { get; set; } + + [AllowHtml] + [Required(AllowEmptyStrings =false, ErrorMessage ="Trying to submit an empty quote, I see?")] public string Body { get; set; } + public string AuthorAvatar { get; set; } + + [Required(ErrorMessage ="We must know what year this quote was said in.")] public long Year { get; set; } + public bool IsApproved { get; set; } } public class BannedIP -- cgit v1.2.3