title: NSString value validation in iOS
body: <p>This simple validation method for <code>NSString</code> makes trouble.
  I have an <code>NSString</code> value and I want to validate the string, i.e, if the string contains <strong>only 'a to z' (or) 'A to Z' (or) '1 to 9' (or) '@,!,&amp;'</strong> then the string is valid.  If the string contains any other values then this the <code>NSString</code> is invalid, how can i validate this..?</p>
  
  <p>As example:</p>
  
  <p>Valid:</p>
  
  <pre><code>NSString *str="aHrt@2"; // something like this 
  </code></pre>
  
  <p>Invalid:</p>
  
  <pre><code>NSString *str="..gS$"; // Like this
  </code></pre>