Result

ASP.NET MVC Multiple Checkboxes Validation and Handling using C#

This post shows how to process multiple dynamic or static checkboxes in ASP.NET MVC. Input form validation is easy to accomplish with System.ComponentModel.DataAnnotation’s ValidationAtribute. Validating and processing multiple checkboxes at once is very tricky. I created a form model that maps each checkbox group to a List and implemented ValidationAttribute to create a custom attribute that handles the validation of each checkbox group.