Being able to validate strings is essential when creating forms, or just about anywhere you’re asking the user for some kind of text input, and I’ve been asked recently about
I’ve mentioned the US2FormValidator which does a good job, and here’s another library from Brett Walker for the same purpose called PMValidation.
There’s a number of differences with this library and creating some validators is definitely easier with the built in validation classes, and you simply apply the validation to a string or UIText object – no custom text field required.
The features as stated in the readme include:
– Validate individual string objects or listen to changes from UIKit objects
– Modular – validation types can be used together to create complex validation constraints
– Extensible – Easily create your own validation types by subclassing PMValidationType
– Comes with several useful validation types to satisfy most validation needs
– Easily implement form validation by using PMValidationManager to register many UIKit objects
You can find PMValidation on Github here.
A nice simple to use library for performing text validation. By the way at the time of this post there appears to be a small error with a logging statement in the demo, but the example works fine.
Submit A Resource
Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?
You can submit the url here.
The resources we feel will appeal to our readers the most will be posted on the front page.