jQWidgets Forums
Forum Replies Created
-
Author
-
December 8, 2015 at 12:12 am in reply to: editable false in createeditor editable false in createeditor #79030
Ah….
thank you Dimitarthank you Dimitar.
December 7, 2015 at 1:02 am in reply to: reselect "selectedIndex – 1" reselect "selectedIndex – 1" #78951thank you Dimitar..
Oh..I think I have the wrong question to you.
My intention is …
Not change in the code, the end user can change in the UI.
The ‘== ALL ==’ item will not be visible on the screen, so the end user can not select the ‘== ALL ==’ item.
Will not this another way?
Thank you for your help…ivailo
hi ivailo..
i saw a your sample code.. thanks..
but i must make a button tag dynamically..
so i made ‘buttonString’
but because make a okbutton dynamically, okButton property is a null..
so i defined okButton on next line..
…………..Here is demo
can you help me?
Have a nice weekend..November 17, 2015 at 1:55 am in reply to: static custom rules in validators static custom rules in validators #78227Ahahaha…
i found a solution.. thank you~~
function domain(input, commit){
//somthing….return true;
}$(‘#form’).jqxValidator({
rules: [{
input: ‘#passwordInput’,
message: ‘The password is required!’,
action: ‘keyup’,
rule: domain
}]
});November 17, 2015 at 12:54 am in reply to: static custom rules in validators static custom rules in validators #78225hi~
i read api doc about “custom function”
(‘#form’).jqxValidator( { rules: [{ input: ‘#passwordInput’,
message: ‘The password is required!’,
action: ‘keyup’,
rule: ‘required’ },
{ input: ‘#passwordInput’,
message: ‘Your password must be between 4 and 12 characters!’,
action: ‘keyup’,
rule: ‘length=4,12’ }] } );Custom Rule Definition. The function returns true or false depending on whether the input is correct or not.
{ input: ‘#birthInput’, message: ‘Your birth date must be between 1/1/1900 and 1/1/2012.’, action: ‘valuechanged’, rule: function () {
var date = $(‘#birthInput’).jqxDateTimeInput(‘value’);
var result = date.dateTime.getFullYear() >= 1900 && date.dateTime.getFullYear() <= 2012;
return result;
}but this case is not static…
i want to reues rules after define rule function.
see the sample..
———————————-
jQuery.validator.addMethod(“domain”, function(value, element) {
return this.optional(element) || /^http:\/\/mycorporatedomain.com/.test(value);
}, “Please specify the correct domain for your documents”);$( “#form” ).validate({
rules: {
passwordInput: {
// custom rule name
domain: true
}
}
});—————————————————–
SO..
how can i make a custom function for “REUSE” ?thanks for your answer.
-
AuthorPosts