jquery-simple-combobox
jquery-simple-combobox copied to clipboard
Allow not from option, but matching pattern
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
To imagine:
Here is commit with defining pattern: 8d081a56984d2d62aeb5583a9c288061c1c01128