I'm using some masked input plugin, which supports mask as the RegEx array. In my case, I want to validate 24h time format (hh:mm). I'm using now RegEx like this:
[/^([0-2])/, /([0-9])/, ':', /[0-5]/, /[0-9]/]
First 2 array elements represents hours
/^([0-2])/, /([0-9])/
Any suggestions how to validate second hour digit? Cause now 25:00 is valid but shouldn't. Need somehow to check first number and if it's 2 - replace [0-9] with [0-3].