We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2df7b26 + 6437a48 commit b2de8b9Copy full SHA for b2de8b9
Chirp/src/Chirp.Web/Pages/BindingModels/MessageModel.cs
@@ -1,8 +1,11 @@
1
+using System.ComponentModel.DataAnnotations;
2
using Microsoft.AspNetCore.Mvc;
3
4
namespace Chirp.Web.Pages.BindingModels;
5
6
public class MessageModel {
7
[BindProperty]
8
+ [Required]
9
+ [StringLength(160, ErrorMessage = "Maximum length needs to be {0}")]
10
public string? Message {get; set;}
11
}
0 commit comments