title: Validating UITextField input and displaying error
body: <p>What's the best practice for validating user input in a UITextField and displaying error? I tried performing checks inside <code>textFieldShouldReturn</code> and <code>textFieldShouldEndEditing</code> and popping up an error box when userever inputted invalid content. </p>
  
  <p>However, during testing, the popup from <code>textFieldShouldEndEditing</code> is getting invoked multiple times. My simple test was to input invalid text in TextFieldA and navigate directly to TextFieldB. I observed 3 error popups, all generated by <code>textFieldShouldReturn</code></p>