Formatting a limit to work against a timespan requires you to use a datetime format such as HH:MM, or if you need to use days, DD.HH:MM.
Note: They can be both used together or separately.
D = Days
H = Hours
M = Minutes
There is a maximum of 59 minutes, which then turns into 1 hour.
There is a maximum of 23 hours, which then turns into 1 day.
There is no maximum of days.
Format for a validation rule
To set up a limit in a validation rule, simply use the format HH:MM (or DD.HH:MM) with a regular Invalid when [...] or SET [...] rule.
Here are some examples:
The timespan appearing in a cell will be invalid if it is greater than 2 days and 6 hours.
Invalid when greater than 2.06:00
The limit (which needs to be set in a text field) will be set to 7 hours or 14 hours, based on the type of product.
SET 07:00 when Product is Fresh SET 14:00 when Product is Frozen
Then, you would add to a timespan the rule Invalid when greater than [LimitField].
Format for an external list or matrix
To set up a limit through an external list or matrix, you can add the values in their HH:MM (or DD.HH:MM) format, but since Excel will automatically convert the values, make sure to format the cells as TEXT or add an apostrophe before the values so that Excel take the values you add as is, like this:
'07:00
The limits will need to be filling text fields in order to work and be compared with a timespan field.