How should I apply constraints to the attributes of my asset?

Hello everyone, how should I apply constraints to the attributes of my asset?

I want to have a text field to insert only a time in the format HH:MM.

For that, I thought about applying a regex. But I am having trouble applying it.

Another equally interesting rule for me would be to limit the possible ranges for attributes that are integers numbers. If someone could explain, I would be very grateful.

Thank you.

Hey there,
I can help you to resolve your issue.

  1. Time Format Constraint: Using a regex for HH format is a good idea. If you’re stuck, could you share your regex so I can help?

  2. Limiting Integer Ranges: Set minimum and maximum values for integer attributes. For example, if you want numbers between 1 and 100, set those limits.

Hello Shawn,
To match time in HH:mm the regex expression that i think was:

^(?:[01]\d|2[0-3]):[0-5]\d$

My question is about the way to declare this constraint to an attribute. Because the text field called Constraints, expects a json string. I didn’ t find the syntax for constraints json keys.

Thanks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.