How to check if there are only spaces in textbox?

(Aditya Singh) #1

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.

(Cian) #2

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.

(Aditya Singh) #3

Thank you!

1 Like
(Bajrangi) #4

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

(SunnyTheDeveloper) #5

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

1 Like
(Aravind Chowdary) #6

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

Hope it helped you !

1 Like
(Bajrangi) #7

Thanks alot bro​:slight_smile:

1 Like