Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
645
Validation not working
posted

I am having issues getting the validation for an igCombo to work.  I am using knockout to bind my data.   The data binds find and I click on the "x" icon to clear the data but when i try to call validation on the field I am getting an error.  Usually I use the below code however I am getting an error about the validator not being initialized.

var itemValid = isNaN($('#Headquarters_State2').igValidator('validate'));

<span id="Headquarters_State2" data-bind="igCombo: {
text: State,
dataSource: States,
textKey: 'Abbreviation',
valueKey: 'StateCode',
enableSelectionChangedUpdate: true,
width: '200',
mode: 'dropdown',
width: 70,
validatorOptions: { required: true }
}"></span>