I'm using select2 with addValidator "required_select", when I remove the selected option, it stays in the state of success.
I want to display the error immediately after removing the option
I haved add a custom validator:
//Add custom validator
$.formUtils.addValidator({
name : 'required_select',
validatorFunction : function(value, $el, config, language, $form) {
return value !== '';
},
errorMessage : 'Field is required',
errorMessageKey: 'badSelectRequired'
})
I'm using select2 with addValidator "required_select", when I remove the selected option, it stays in the state of success. I want to display the error immediately after removing the option
I haved add a custom validator:
Thanks!