Skip to content

Commit fef451d

Browse files
authored
Merge pull request #10 from bmoussaud/Issue9
Resolve #9: Update Message.cs to improve data handling
2 parents a81c50b + 781637e commit fef451d

File tree

1 file changed

+10
-1
lines changed
  • src/Application/src/RazorPagesTestSample/Data

1 file changed

+10
-1
lines changed

src/Application/src/RazorPagesTestSample/Data/Message.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ public class Message
77
{
88
public int Id { get; set; }
99

10+
/// <summary>
11+
/// Gets or sets the message text.
12+
/// </summary>
13+
/// <value>
14+
/// The message text, which is required and must be a string with a maximum length of 250 characters.
15+
/// </value>
16+
/// <exception cref="ValidationException">
17+
/// Thrown when the text exceeds the 200 character limit.
18+
/// </exception>
1019
[Required]
1120
[DataType(DataType.Text)]
12-
[StringLength(200, ErrorMessage = "There's a 200 character limit on messages. Please shorten your message.")]
21+
[StringLength(200, ErrorMessage = "There's a 250 character limit on messages. Please shorten your message.")]
1322
public string Text { get; set; }
1423
}
1524
#endregion

0 commit comments

Comments
 (0)