Word entry limit

Hello colleagues,
How can I limit the amount of text entered in the box reserved for text-based responses? I want the person entering the information to write for example “Not more than 250 words in the text box being filled such that when it’s beyond 250 words, it is highlighted with red, showing that he/she has exceeded the limit”

You can use the function; string-length (.)<=1000 as the contraint of the text questions. I am assuming here that on average each word is 4 characters length that’s why i am capping it at 1k(4x250)

@jotim, you should be able to do it as outlined in the post discussed previously: