Skip to content

Commit 4d66356

Browse files
authored
Merge pull request #9 from sven-pohl/features/8_message_length
Update character limit for message text field
2 parents 5758ecd + cb92614 commit 4d66356

File tree

1 file changed

+14
-2
lines changed
  • src/Application/src/RazorPagesTestSample/Data

1 file changed

+14
-2
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ public class Message
77
{
88
public int Id { get; set; }
99

10-
[Required]
10+
/// <summary>
11+
/// Gets or sets the text of the message.
12+
/// </summary>
13+
/// <value>
14+
/// The text content of the message, limited to 250 characters.
15+
/// </value>
16+
/// <remarks>
17+
/// The text must be a valid string and is required. If the text exceeds 250 characters, an error message will be displayed.
18+
/// </remarks>
19+
/// <exception cref="ValidationException">
20+
/// Thrown when the text exceeds 250 characters or is not provided.
21+
/// </exception>
22+
/// /// /// /// /// /// /// /// /// /// /// /// [Required]
1123
[DataType(DataType.Text)]
12-
[StringLength(200, ErrorMessage = "There's a 200 character limit on messages. Please shorten your message.")]
24+
[StringLength(250, ErrorMessage = "There's a 200 character limit on messages. Please shorten your message.")]
1325
public string Text { get; set; }
1426
}
1527
#endregion

0 commit comments

Comments
 (0)