Hi All,
I want to use the masked input for exmple for users to fill in an ip address, but there are some odd or developers intended results.
I already understand that the use of real regular expressions is not applicable, for example a very simple regex:
$(field).jqxMaskedInput({ width: 250, height: 25, mask: '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}', theme: siteSettings.getTheme()});
$(field).jqxMaskedInput({value: $(field).val() });
results in the input field: “1{1,3}.9{1,3}.2{1,3}._{1,3}” (also pressing ctrl+c now on this fields yields an: “Uncaught TypeError: Cannot call method ‘setData’ of undefined at line ‘7’ in file: ‘http://192.168.1.6:8080/shared/js/jq/jqx-all.js’.”
Also using for example [0-9].[0-9].[0-9].[0-9] does not let a user type a dot where the cursor moves to the next field behind a dot. But this can be just a feature request if it was never intended to work this way.
When i use the above “regex” and want to set the value: “192.168.1.7” only the first “192” is shown.
Also the above regex implies that the you MUST have 3 characters before the first dot instead of optional, if i would enter 010.001.7.1 i’m defining an possible octal instead of a decimal which could lead to wrong parsing of the ip address
Is it possible to use the masked input as a visual representation for ip addresses as the example on the website implies?
Best regards,
John.