Simple and ready to use subclass of UITextField which uses NSRegularExpression to allows you to validate text in the text field with pattern you set.