File tree Expand file tree Collapse file tree 2 files changed +0
-10
lines changed
src/Components/Samples/BlazorUnitedApp Expand file tree Collapse file tree 2 files changed +0
-10
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<PageTitle >Validated Order Form</PageTitle >
8
8
9
- <h3 >Validated Order Form</h3 >
10
-
11
9
<EditForm Model =" @order" OnValidSubmit =" @HandleValidSubmit" OnInvalidSubmit =" @HandleInvalidSubmit" >
12
10
<DataAnnotationsValidator />
13
11
48
46
<InputText id =" shippingStreet" @bind-Value =" order.CustomerDetails.ShippingAddress.Street" class =" form-control" />
49
47
<ValidationMessage For =" @(() => order.CustomerDetails.ShippingAddress.Street)" />
50
48
</div >
51
- <div class =" mb-3" >
52
- <label for =" shippingCity" class =" form-label" >City</label >
53
- <InputText id =" shippingCity" @bind-Value =" order.CustomerDetails.ShippingAddress.City" class =" form-control" />
54
- <ValidationMessage For =" @(() => order.CustomerDetails.ShippingAddress.City)" />
55
- </div >
56
49
<div class =" mb-3" >
57
50
<label for =" shippingZipCode" class =" form-label" >Zip Code</label >
58
51
<InputText id =" shippingZipCode" @bind-Value =" order.CustomerDetails.ShippingAddress.ZipCode" class =" form-control" />
Original file line number Diff line number Diff line change @@ -7,9 +7,6 @@ public class AddressModel
7
7
[ Required ( ErrorMessage = "Street is required." ) ]
8
8
public string ? Street { get ; set ; }
9
9
10
- [ Required ( ErrorMessage = "City is required." ) ]
11
- public string ? City { get ; set ; }
12
-
13
10
[ Required ( ErrorMessage = "Zip Code is required." ) ]
14
11
[ StringLength ( 10 , MinimumLength = 5 , ErrorMessage = "Zip Code must be between 5 and 10 characters." ) ]
15
12
public string ? ZipCode { get ; set ; }
You can’t perform that action at this time.
0 commit comments