Hi Adam,
Good day to you.
We have checked your code example with provided screenshot and we suspect that you have changed the value for the EJ2 MultiSelect dynamically. But, our MultiSelect validated the value within the form in the focus out action which caused this issue. So, we suggest you validate the MultiSelect component in the change event as like in the below code example.
// initialize MultiSelect component
var listObj = new ej.dropdowns.MultiSelect({
// set the placeholder to MultiSelect input element
placeholder: 'Favorite Sports',
// set the type of mode for how to visualized the selected items in input element.
mode: 'CheckBox',
change: onChange
});
listObj.appendTo('#default');
var options = {
rules: {
default: { required: true }
}
};
// Initialize the FormValidator.
var formObj = new ej.inputs.FormValidator('#formId', options);
function onChange(args) {
formObj.validate("default"); // To validate the Multiselect component
} |
For your convenience, we have prepared the simple for MultiSelect with form validation and same can be found from below link,
Could you please check the above sample and get back to us with more details if you still face the issue or need any further assistance on this?
Regards,
Vinoth Kumar S