Easy To Use iOS String And UIText Validation Library (Regex Comparisons and More)

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.

DeliciousTwitterFacebookRedditLinkedInEmail

Original article: Easy To Use iOS String And UIText Validation Library (Regex Comparisons and More)

©2012 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *