Forum Discussion

AnaPavlovic-5b7's avatar
AnaPavlovic-5b7
Community Member
2 months ago

Setting up Text entry field so the user cannot only type space

I've set up a text entry accepting user comments. I even have a layer preventing them from continuing if they try to skip it. However, I noticed that if they just type " " (space), it counts as a contribution and they can proceed. How would I set things up so typing just space is not allowed? No issues with space in general, as long as it is accompanied by actual text. Thank you!

  • You could set up javascript to count the characters, this will still need trust as they can still type nonsense. 

    fsdfsdgsdfg

    and that is still not meaningful.

  • SBP_Inc's avatar
    SBP_Inc
    Community Member

    Adding onto Phil's great answer, use a regular expression to exclude spaces before counting characters