Currently, I'm utilizing Bootstrap 2 in my project.
One of the challenges I am facing is that within a form, there is a button triggering a bootstrap modal dialog. Inside this dialog, we have a select2 control that needs validation - specifically, it should require at least one value. How can I implement validation on the select2 control to ensure it's a required field before the dialog closes?
It's worth noting that closing the dialog does not automatically submit the form.
Is there a built-in mandatory or required property in Select2? Can I somehow link the Save button in the dialog to the validation of the select2 control?
My current tech stack includes MVC4, Bootstrap 2, and Razor as the templating engine.