When I add this regex into validation engine I get a javascript error: "unexpected token", it seems that the regex is wrong because it is underline with red, why?
"time1":{
"regex": ^([0-9]|0[0-9]|1[0-3]|2[0-3]):[0-5][0-9]$,
"alertText": "* Invalid Time"
}
Replace
"regex": ^([0-9]|0[0-9]|1[0-3]|2[0-3]):[0-5][0-9]$,
with
"regex": /^([0-9]|0[0-9]|1[0-3]|2[0-3]):[0-5][0-9]$/,
See the syntax of regex literals.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With