jQWidgets Forums

jQuery UI Widgets Forums Angular jqxValidatorComponent in Augular 2 – jqxComboBox

This topic contains 1 reply, has 2 voices, and was last updated by  Ivo Zhulev 8 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • andrea
    Participant

    Hello, I’m using jQWidgets with Angular 2, and I have some problems with the jqxValidatorComponent,
    may be I using it in the wrong way ?
    It works fine with jqxInput component, but I’m not able to make it work with jqxComboBox or jqxDropDownList.
    When validation fails the message does not appear near the compobox or the dropdown list, even if the onSuccess even is not fired.
    I followed the examples and suggestions from previous posts I used the function validation returning always false for testing.
    Please let me know if you have some suggestions on how to make it work.
    Thanks

    Here is my setup:

    Jquery version: 1.11.1
    jQWidgets version: 4.5.0
    Angular version: 2.4.7
    Typescript versin: 2.1.4
    OS version: Ubuntu 16.04
    Browser: Google Chrome version 55.0.2883.87 (64-bit)

    Example:

    From the typescript file:

        rules: any[] = 
            [
                { input: '#username',       message: 'Username is required', action: 'keyup, blur', rule: 'required' },
                { input: '#timeFormat',     message: 'Time format is required', action: 'select', 
                    rule: (input, commit): boolean => {
                        return false;
                    }
                }
    	]
    

    From the htm file:

    
    <jqxValidator #validatorReference [rules]='rules'>
    	<form id='formUserDetail' action="./">
    		<table style="padding: 10px; border: 0px solid lightgrey">
    		    <tr>
    		        <td colspan="2">User name:</td>
    		        <td colspan="2"><jqxInput #username id="username" theme='{{theme}}' [(ngModel)]='user.username' name='username' [width]='200' [height]='25' [minLength]='1'></jqxInput></td>
    		    </tr>
    		    <tr>
    		        <td colspan="2">Time format:</td>
    		        <td colspan="2"><jqxComboBox #timeFormat id="timeFormat" theme='{{theme}}' [(ngModel)]='user.timeFormat' name='timeFormat' [source]='timeformats' [selectedIndex]='0' [width]='200' [height]='25'></jqxComboBox></td>
    		    </tr>
    		</table>
    	</form>
    </jqxValidator>
    

    Ivo Zhulev
    Participant

    Hi andrea.p,

    Thanks for the report. A work item has been created.

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.