Is there a way to remove ModelState errors during an ASP.NET MVC postback without having to write each one by hand.
Let\'s say we have a checkbox Billing Same
Billing Same
Asp core 2.2 razor pages. Removes a nested objects modelstate(onpost) error in a list on type Input.ClubInfo.
for (int i = 0; i < Input.ClubInfo?.Count; i++) { ModelState.Remove("Input.ClubInfo[" + i + "].Membershipnr2"); }