Custom field validation

Custom field validation

Hi,
Is there a way to implement custom validation, for example using a regex?

I have a field which I want to restrict input to the following format [0-9][0-9]:[0-9][0-9]-[0-9][0-9]:[0-9][0-9]

The users are being prompted to enter opening hours for their businesses in the format HH:mm-HH:mm

Thanks in advance!