To run the example project, clone the repo, and run pod install
from the Example directory first.
using Interface Builder
Step 1) set the class of UITextField to FZValidationTextField
Step 2)
add runtime attribute "validationType":"String" "any validation type like name,email,number,"
OR
if you want length validations add runtime attribute "minLength":"Number" or "maxLength":"Number" or you can use both
OR
for custom regex you need to use "customMessage" and "customRegex" runtime attributes
Step 3) now you can check as many fields as you want to validate NSError *error=[ValidationUtilityMethods validateFields:@[nameField,emailField];
using Programatically
you can also create validation fields programmatically FZValidationTextField *emailField=[FZValidationTextField alloc]init];
now just set validationType and use it as defined above for interface builder usage.
FZValidationTextField is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "FZValidationTextField"
Faheem, faheemzikeria@gmail.com
FZValidationTextField is available under the MIT license. See the LICENSE file for more info.