UK-SBCoA / uniform-data-set-dotnet-web

.NET Core implementation of UDS with MVC and Razor Class UI Library
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Arthritis checkboxes validation (allow false) #58

Closed ashleybot closed 1 year ago

ashleybot commented 1 year ago

When the domain property is null or 0 then the view model property should be mapped to false, and vice-versa.

When the domain property is 1 then the view model property should be mapped to true, and vice-versa.

This allows for easily rendering checkboxes and for the appropriate values to be mapped in both directions. Before this fix, the model would not allow implicit conversions for false.

ashleybot commented 1 year ago

@smiththay Please take a look at my PR. The D1 also has several checkboxes that we'll need to update when the time comes.

smiththay commented 1 year ago

@ashleybot Functions the way it should

ashleybot commented 1 year ago

Thank you @smiththay