Let's say we have a text input box, the following in it's onchange will check the value entered and if it is a valid time in military time will display a success message (alternatively this can just reset the text input if an error and also give the error, etc. the example is just for you to understand the function)
You can also put a similar code in the display mode of button below to set it to disabled until the formula is satisfied.
If(
And(
Value(First(Split(TextInput2,":")).Result)<24,
Value(Last(Split(TextInput2,":")).Result)<60),
Notify("Action if Valid Time",NotificationType.Success),
Notify("Action if Invalid Time",NotificationType.Error))