ustwo/US2FormValidator — pull request #6 by alexefish (2012-07-18 21:29:52+00:00)
Title: Fixing issue #3 and US2RangeCondition max value bug

* Fixing issue #3 by implementing an additional check at `US2ValidatorTextFieldPrivate.m:68`.

* Also fixing a bug in `US2ConditionRange.m` where the max range value was not triggering a violation.
This was because of the regex check `.{%d,%d}` matching more than one result and condition passing for more than one match `return numberOfMatches > 0;`. For example `.{1,3}` on the string `aaaa` returns two matches, one for `a` and another for `aaa` which is incorrect. To catch this problem i've updated the method to only accept 1 result as valid.

* Updated the sample app to implement a min and max range check on the `Name` field to illustrate the fixes working correctly.