Chapter 3
Extensions
Section 3
Text Validation
In numerous apps, across multiple platforms, we are often asked to validate user input either after the user has entered it. This validation can be done very easily with regular expressions; however, we do not want various regular expression strings littered throughout our code. We can solve this problem by creating different classes or structures that contain the validation code. - Develop validation framework without protocol extensions - Define protocol and create a class that conforms to protocol - Define our text validation types