How to make sure blank messages cannot be sent PHP Validation
I have a chat application, the back-end is PHP. I want to make sure user's cannot spam blank messages.

As well as just the plain 
"if(!empty($string)) {"

I want to make sure that the user cannot send messages with just a space and limit the characters to just the ones on a standard keyboard. "1234567890-=qwertyuiop[]asdfghjkl'#\zxcvbnm,./!"£$%^&*()_+|?<>" <-- like that.
How to make sure blank messages cannot be sent PHP Validation
===

I have a chat application, the back-end is PHP. I want to make sure user's cannot spam blank messages.

As well as just the plain 
"if(!empty($string)) {"

I want to make sure that the user cannot send messages with just a space and limit the characters to just the ones on a standard keyboard. "1234567890-=qwertyuiop[]asdfghjkl'#\zxcvbnm,./!"£$%^&*()_+|?<>" <-- like that.