Commit 63e8b40
committed
Updated
In a previous update, I switched from `[NotNull, DisallowNull]` to `= default!`. These _should_ be syntactically equivalent. But they're not actually treated that way by the model binding validator, which will allow `[DisallowNull]` on a nullable type, but not on a non-nullable type. This is an issue because radio buttons, in particular, might be null—which is why we don't validate `Value` in the `AttributeBindingModelBinder`.
This can be fixed by making `Value` nullable. This has some downstream effects, which will be addressed separately.AttributeBindingModel.Value to allow null values1 parent b635bf8 commit 63e8b40
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
0 commit comments