This is simple and ready to use subclass of UITextField that allows you to validate text in the text field with pattern you set.