-
Notifications
You must be signed in to change notification settings - Fork 25.3k
/
CheckName.cshtml
39 lines (37 loc) · 1.46 KB
/
CheckName.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@model User
@{
ViewData["Title"] = "Check Name";
}
<h2>Check Name</h2>
<form asp-action="CheckName">
<div class="form-horizontal">
<h4>User Name</h4>
<hr />
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<ol>
<li>Enter a first name and last name. Validate accepts the name.</li>
<li>Enter a different first name and last name. Validate accepts the name.</li>
<li>Re-enter the first name and last name from the first step. Validation fails.</li>
</ol>
<label asp-for="FirstName" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="FirstName" class="form-control" />
<span asp-validation-for="FirstName" class="text-danger"></span>
</div>
<label asp-for="LastName" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LastName" class="form-control" />
<span asp-validation-for="LastName" class="text-danger"></span>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="button" value="Validate" class="btn btn-default" />
</div>
</div>
</div>
</form>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}