Skip to content

Instantly share code, notes, and snippets.

@bleroy
Created April 1, 2015 22:18
Show Gist options
  • Save bleroy/e7abda2c1f0356a3db4f to your computer and use it in GitHub Desktop.
Save bleroy/e7abda2c1f0356a3db4f to your computer and use it in GitHub Desktop.
CodePlex Issue #16373 Plain Text Attachments
diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Models/CommentRecord.cs b/src/Orchard.Web/Modules/Orchard.Comments/Models/CommentRecord.cs
--- a/src/Orchard.Web/Modules/Orchard.Comments/Models/CommentRecord.cs
+++ b/src/Orchard.Web/Modules/Orchard.Comments/Models/CommentRecord.cs
@@ -1,5 +1,6 @@
using System;
using Orchard.ContentManagement.Records;
+using Orchard.Data.Conventions;
namespace Orchard.Comments.Models {
public class CommentRecord : ContentPartRecord {
@@ -9,6 +10,7 @@
public virtual string Email { get; set; }
public virtual CommentStatus Status { get; set; }
public virtual DateTime? CommentDateUtc { get; set; }
+ [StringLengthMax]
public virtual string CommentText { get; set; }
public virtual int CommentedOn { get; set; }
public virtual int CommentedOnContainer { get; set; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment