I have a text box which accepts time in the format HH:mm and entries should only be in 24-hour format.For all invalid entries, a common message ‘Invalid entry’ should be displayed.
For eg:
19:61 //INVALID
12:00am //INVALID
12***M //INVALID
06:00 //VALID
22:00 //VALID
5:45 //VALID
The code required is in Java.
Not familiar with regex expressions…so need your ideas on it.Thx in advance! 🙂
String timeStr = getTimeBoxValue();
There is a Link
Which you can use.