My problem is simple, but I can't find a way to fix it. I hope to get some help here. Since I had problems with language support on my page, I was forced to use letter codes. E.g. А Б
- Russian letters А and Б. Because I don't have that much of Russian content on the page, I didn't bother to search for alternative way. But I stuck with this problem:
function updateTips( t ) {
tips
.text( t )
.addClass( "ui-state-highlight" );
setTimeout(function() {
tips.removeClass( "ui-state-highlight", 1500 );
}, 500 );
}
function checkLength( o, n, min, max ) {
if ( o.val().length > max || o.val().length < min ) {
o.addClass( "ui-state-error" );
//here is my problem situated
updateTips( "Длина " + n + " должна быть мужду " + min + " и " + max + "." );
return false;
} else {
return true;
}
}
function checkRegexp( o, regexp, n ) {
if ( !( regexp.test( o.val() ) ) ) {
o.addClass( "ui-state-error" );
updateTips( n );
return false;
} else {
return true;
}
}
When the code is executed, the output isn't the one I wish to see. As the output I see same "Длина...."
and it supposed to show letters, which belong to those codes. Any advise or alternative way for fixing this issue would be appreciated. Thank you in advance.