Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit 99f8720

Browse files
author
N. Taylor Mullen
committed
Updated TagHelper sample's use of ValidationSummaryTagHelper.
1 parent dcb4b38 commit 99f8720

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

samples/TagHelperSample.Web/Views/Home/Create.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
<div class="form-horizontal">
1111
@* validation summary tag helper will target just <div/> elements and append the list of errors *@
1212
@* - i.e. this helper, like <select/> helper has ContentBehavior.Append *@
13-
@* validation-model-errors-only="true" implies validation-summary="true" *@
14-
@* helper does nothing if model is valid and (client-side validation is disabled or validation-model-errors-only="true") *@
13+
@* helper does nothing if model is valid and (client-side validation is disabled or validation-summary="ModelOnly") *@
1514
@* don't need a bound attribute to match Html.ValidationSummary()'s headerTag parameter; users wrap message as they wish *@
1615
@* initially at least, will not remove the <div/> if list isn't generated *@
1716
@* - should helper remove the <div/> if list isn't generated? *@
1817
@* - (Html.ValidationSummary returns empty string despite non-empty message parameter) *@
19-
<div validation-summary="true" validation-model-errors-only="true">
18+
@* Acceptable values are: "None", "ModelOnly" and "All" *@
19+
<div validation-summary="ModelOnly">
2020
<span style="color:red">This is my message</span>
2121
</div>
2222

samples/TagHelperSample.Web/Views/Home/Edit.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<form>
88
<div class="form-horizontal">
9-
<div validation-summary="true"/>
9+
<div validation-summary="All"/>
1010
<input type="hidden" for="Id" />
1111

1212
<div class="form-group">

0 commit comments

Comments
 (0)