summaryrefslogtreecommitdiff
path: root/Project-Unite/Models/IdentityModels.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-31 18:41:36 -0400
committerMichael <[email protected]>2017-05-31 18:41:36 -0400
commit82c0215b9743c8cc7e90a054b6cff9fb8f6cebe7 (patch)
tree6e87b173f9650fc6c5a8e772f70ebe00d22614e8 /Project-Unite/Models/IdentityModels.cs
parent1dcba9a68839ac0eac372030b20d9c0c8f2f8e0e (diff)
downloadproject-unite-82c0215b9743c8cc7e90a054b6cff9fb8f6cebe7.tar.gz
project-unite-82c0215b9743c8cc7e90a054b6cff9fb8f6cebe7.tar.bz2
project-unite-82c0215b9743c8cc7e90a054b6cff9fb8f6cebe7.zip
User-submitted quotes.
Diffstat (limited to 'Project-Unite/Models/IdentityModels.cs')
-rw-r--r--Project-Unite/Models/IdentityModels.cs10
1 files changed, 10 insertions, 0 deletions
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