How to Validate 24-Hour Time Format in EspoCRM Using a Formula

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IshitaRana
    Junior Member
    • Apr 2025
    • 18

    #1

    How to Validate 24-Hour Time Format in EspoCRM Using a Formula

    Hi,

    I have a Text field in EspoCRM called startTime, and I want to ensure that users enter the time in 24-hour HH:mm format (e.g., 09:30, 23:45).

    I’m looking for a formula that can validate this field and show an error if the input is not in the correct format.
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1729

    #2
    Use a regex expression. You can generate here: https://regex-generator.olafneumann....ue%27.&flags=i
    or on other sites called regex generator.
    Set this in the field configuration pattern field. I think,, when it is set it automatically throws an error and does not allow to save the record. If not automatically, you can create an API befor save formula.

    Comment

    Working...