e.g. 3.15 Using the Html.ValidationSummary Help Method
This commit is contained in:
parent
044c51ef8b
commit
ebfdf467e0
@ -12,7 +12,7 @@ namespace PartyInvites.Models
|
||||
ErrorMessage = "Please enter a valid email address")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Please enter your name")]
|
||||
[Required(ErrorMessage = "Please enter your phone number")]
|
||||
public string Phone { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Please specify whether you'll attend")]
|
||||
|
@ -13,6 +13,7 @@
|
||||
<body>
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.ValidationSummary()
|
||||
<p>Your name: @Html.TextBoxFor(x => x.Name)</p>
|
||||
<p>Your email: @Html.TextBoxFor(x => x.Email)</p>
|
||||
<p>Your phone: @Html.TextBoxFor(x => x.Phone)</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user