How to check if there are only spaces in textbox?

I’m creating a chatting app and in the textbox, I don’t want user to enter only spaces. How can I do that? I want to check if there are only spaces in the textbox.

Nice question. There are a few ways I think you can do it, however this is the simplest, however it will also catch punctuation as not compliant.

4 Likes

Thank you!

1 Like

How to invisible something if there’s nothing in textbox.
Means if i want to search with Textbox but when i cleared everything in textbox it still shows the searched one

Use is empty block to check that a textbox is empty or not.

1 Like

In simple, You can use “trim” block in texts which removes the white spaces and then check if its empty !

Hope it helped you !

2 Likes

Thanks alot bro​:slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.