title: CoreData validateValue: forKey:
body: <p>I am trying to use validatevalue:forkey: method to validate a coredata property.</p>
  
  <p>I have a textfield that I am getting a string from I then want to check that string against my validation.  </p>
  
  <p>I am assuming that it is attempting to validate against the Reg. Exp. I have in my model.</p>
  
  <p>However, no matter what I input it will always pass the validation. </p>
  
  <p>EDIT:</p>
  
  <p>The regular expression is a standard regular expression for validating email.</p>
  
  <p>I can post some "official" code tomorrow, but its basically like the following:</p>
  
  <pre><code>NSString *string = textfield.text;
  
  if(![myEntity validateValue:&amp;string forKey:@"email"])
  {
      // provide necessary user feed back i.e. let user know email is not in valid format}
  }
  </code></pre>