jquery-simple-combobox icon indicating copy to clipboard operation
jquery-simple-combobox copied to clipboard

Allow not from option, but matching pattern

Open odie2 opened this issue 9 years ago • 2 comments

Hi,

I have select with options like 9:00, 9:50, however ATM I don't know every value and anyway would supply option to write own hour, but only in xx.xx or xx:xx format, so I wrote regex (\d{1,2}\.\d{2})|(\d{1,2}\:\d{2}).

I would use both forbidInvalid and invalidAsValue properties as true, however I must "sanitize" user-typed value with my regex to make sure that my shortcode will be properly inserted into textarea.

~~I would do catching pattern attribute myself~~ 8d081a5, but I am not sure about validating user-typed values with set those both properties, so plugin will check it correctly and then take an action.

Could you please help me? :) Greetings

odie2 avatar Nov 10 '15 20:11 odie2

To imagine:

image

odie2 avatar Nov 10 '15 20:11 odie2

Here is commit with defining pattern: 8d081a56984d2d62aeb5583a9c288061c1c01128

odie2 avatar Nov 10 '15 20:11 odie2