I pull what to display on a particular form from my database, so the form elements are dynamic.
I display radio buttons, or checkboxes or textboxes/textareas depending on how I want the form to display.
Before someone submits the form, I have to validate that each form entry (radio, checkbox, textbox etc) has been selected.
How can I insert validation to these dynamic form elements?
Example:
<input type="checkbox" id="@formInputId" name="@formInputName" value="@element.Id" />
@foreach (FormElement element in Model.FormElements)but the # of elements comes from the database. Yes validation on the client side is what I am looking for.