JSFiddle - React, Tailwind, and code Playground

by aflynt

HTML

<textarea class="form-control SocialItem" id="SocialComment" placeholder="Watts on your mind?" rows="4"></textarea><button class="btn btn-danger group">
								Post</button>

JavaScript

$('.btn').click(function profanityCheck() {
console.log("hello");
var chatinput = document.getElementById("SocialComment").value;

var value = chatinput.toLowerCase();


					var hasSpaces = /\s/g.test(value); 
					if (hasSpaces) {
						console.log('spaces are present');
						return true;
						
							
					}
					else {console.log('spaces are not present');	}
			
      
      //checkforSpaces(value);
});