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>

Parents
No Data
Reply
  • 4315
    Offline posted

    Hi, Mike.

    You can try to explicitely request the igValidator, while configuring the igLoader. If this doesn't help you, we will investigate the problem further. The followig code worked for me:

    $.ig.loader({
       scriptPath: "js/",
       cssPath: "css/",
       resources: "igCombo,igValidator,extensions/infragistics.ui.combo.knockout-extensions.js"
    });

    Best regards,

    Nikolay Alipiev

Children