How do i detect if a message is just spaces?

Hello, How do i detect if an input only has the spaces in it? I want to prevent users on my site from doing so.

Just to clarify, I’m using a multiline input.

You can do . trim. count >0 to check if the input message is more than zero characters. Trim remove spaces

1 Like

i didn’t understand that quite well…

Sorry my mistake. here is a snapshot

so you can execute your next action only if the text is not empty or not just spaces


hmm, let me try this and if it works as intended, i will mark this as the solution.

and it does work! thanks!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.