1

I'm looking for a way to restrict how a field gets formatted.

I have a channel for a podcast that should always be in the format of hh:mm:ss - despite the instructions making this clear, editors tend to ignore and invariably we end up with 45.

Is there a way I can take that input and format appropriately or even alert on the frontend that what they've given doesn't validate?

2

What about using a table field with a column for HH/MM/SS, with each one restricted to numbers?

Alternatively you could use https://github.com/fruitstudios/craft-validateit with a custom regex rule, but I've no idea what that would need to be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.