title: Banned words but not if with more words
body: <p>I find solution, to ban some words if they are entered in input field.
  The problem is that i need ban them only when somebody use them as single word, not when are entered with more words.</p>
  
  <p>Example: </p>
  
  <p>If %bannedword% was entered then ERROR must show up, but if somebody write </p>
  
  <p>" %bannedword% wordnotbanned "</p>
  
  <p>all must be marked as correct input fill, without any ERROR.</p>
  
  <p>What i must do to everything works fine?</p>
  
  <p>Here is the jQuery</p>
  
  <pre><code>$('#submit').click(function() {
  
  var bannedWords = ["black", "white"],
  regex = new RegExp('\\b' + bannedWords.join("\\b|\\b") + '\\b', 'i');
  var zalvalid = !regex.test($('#zalmie').val().toLowerCase());
  
  if(!zalvalid) {
  
      $('#zwynik').addClass("hover").html('&lt;strong&gt;ERROR:&lt;/strong&gt;');
      $('#zalmie').focus();
      return false;
  
  } else {
  
      $('#zwynik').addClass("hover").html('&lt;strong&gt;NICE ONE!&lt;/strong&gt;');
  
  }
  
  });
  </code></pre>
  
  <p>and <strong>here is the Fiddle:</strong> <a href="http://jsfiddle.net/p16954wc/" rel="nofollow">http://jsfiddle.net/p16954wc/</a></p>