Validate long text word/character count

There’s no elegant way to limit the length of long text field submissions. I was able to achieve this using formulas and calculated fields, but this requires a button press whereas most users expect the field to automatically check word or character count.

Hi @amiller. You can use regex match in the conditions. This allows users to have a more complex validations.

If you are not familiar with regex, you can ask AI such as ChatGPT to help generate one for you. Here’s an example of a regex that accepts values for a field with a length of up to 10 characters or less.

^.{1,10}$

Please let me know if there is anything else that we can help you with.

Perfect — totally missed that support. Thanks for the fast reply.

After a bit of testing, I’ve discovered that the form isn’t working quite right with regex, at least for me. If I use a character count expression written the above, hard returns cause it to think the text is above the character limit. I created a simple word count regex that I’ve used elsewhere and hard returns actually cause the form to freeze and actually locks up any tabs with miniextensions open — however I believe it’s the same fundamental problem.

Also, using fields rich text enabled.

^(?:\s*\w+\s*){0,500}$ (I’ve tried with and without the \s for the whitespace characters, but that doesn’t matter)

TLDR: Newlines/hard returns seem to break character or word count regex in the long text fields. Also