DBValidator
DBValidator copied to clipboard
General purpose iOS/Objective-C validation framework
I was replace this line `NSNumber *numberValue = [self.object valueForKey:self.keyPath];` with `NSNumberFormatter *f = [[NSNumberFormatter alloc] init]; f.numberStyle = NSNumberFormatterDecimalStyle; NSNumber *numberValue = [f numberFromString:[self.object valueForKey:self.keyPath]]; if (numberValue == nil)...
Would be nice to use something like this: DBValidationStringLengthRule *stringLengthRule = [[DBValidationStringLengthRule alloc] initWithObject:_password keyPath:@"text" minStringLength:1 maxStringLength:50 failureMessage:@"Please provide password between %i %i"]; [_password addValidationRule:stringLengthRule]; Where you will replace min...
Hey, would be nice to have just required validator. I can use DBValidationStringLengthRule, but I need to provide second max param as well. Maybe don't check max if wasn't set...