javascript regular expressions
- by Zhasulan Berdybekov
Help me with regular expressions. I need to check the text on the hour and minute. That is the first case, the text can be from 0 to 12. In the second case, the text can be from 1 to 60.
this is my code:
var hourRegEx = /^([0-9]{2})$/; //You can fix this line of code?
$(document).ready(
function(){
$('form.form').submit(function(){
if( $('input.hour').val().match(hourRegEx) ){
return true;
}
return false;
});
});
In my case, the code says that, for example 52, too, the correct answer