Open jamesRUS52 opened 5 years ago
@jamesRUS52 ,
Is the extra komma after the first \d{2,} intentional?
Inputmask({
regex: "\\d{2}:\\d{2}(:\\d{2})?"
}
).mask("test2");
Yes, two or more digits 10:02:02 10:02 123:02:02 123:02 1234:02:02 1234:02 I want to make time interval Total hours:minute and may be or not with :seconds
@jamesRUS52 ,
When using
Inputmask({
regex: "\\d{2,}:\\d{2}(:\\d{2})?"
}).mask("test2");
What exactly goed wrong?
for value
03:00:1
console.log($('#test2').inputmask('isComplete'));
return True, but is not correct because we need exact two digits in third segment if it present
Uncaught Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. (\d{2,}:\d{2}|\d{2,}:\d{2}:\d{2})
I also tried use another regex
Inputmask.extendAliases({ 'interval': { regex: "\d{2,}:\d{2}(:\d{2})?", onincomplete : function(){$(this).css("background-color",BadColor);}, oncomplete : function(){$(this).css("background-color",GoodColor);} } });
but it does not work also with input "12:00:2" This input is wrong, but regex match it
Please complete the following information: