forked from gothinkster/realworld-starter-kit
/
ErrorMessages.cshtml
37 lines (35 loc) · 969 Bytes
/
ErrorMessages.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
@using BlazorRealworld
<ul class="error-messages">
@foreach (var error in Errors?.username ?? new string[0])
{
<li>The username @error.</li>
}
@foreach (var error in Errors?.email ?? new string[0])
{
<li>The email address @error.</li>
}
@foreach (var error in Errors?.password ?? new string[0])
{
<li>The password @error.</li>
}
@foreach (var error in Errors?.title ?? new string[0])
{
<li>The title @error.</li>
}
@foreach (var error in Errors?.description ?? new string[0])
{
<li>The description @error.</li>
}
@foreach (var error in Errors?.body ?? new string[0])
{
<li>The article text @error.</li>
}
@foreach (var error in Errors?.emailOrPassword ?? new string[0])
{
<li>The email or password @error.</li>
}
</ul>
@functions {
[Parameter]
ErrorsModel Errors { get; set; }
}