Jquery: how to validate time format HH:MM


There are many ways to validate HH:MM format. Below function also can be used to validate HH:MM format.

function ValidateTime(value)
{
  var timepattern = /^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/;
  if (value.match(timepattern ))
    {
       return true;
    }
 return false;
}


Comments

Popular posts from this blog

how to add new line in google form questions | Fix for next line issue in google form questions

How to add new line in dropdown type question in google forms