MMValidationManager Class Reference
| Inherits from | NSObject |
| Declared in | MMValidationManager.h MMValidationManager.m |
Overview
A class that manages a list of objects that conforms to
MMValidatorProtocol. When you call theperformValidation:selector, the validation manager will iterate through its list
of validator objects and checks to see whether or not the validator
object is valid. Every validator object that is not in a valid state,
the validation message is returned.
Instance Methods
addValidator:
- Adds a validator object to the current validation manager.
- (void)addValidator:(id<MMValidatorProtocol>)validatorDiscussion
*
- @param validator A validator object to be added to the validation manager.
Declared In
MMValidationManager.hgetValidationMessagesAsArray
- Iterates through each of the validation objects and calls its
- (NSArray *)getValidationMessagesAsArrayDiscussion
isValid:selector. For every object that fails validation, itserror message is added to an
NSArraywhich holds all the validationerror messages.
*
@return A list of
NSStringobjects that represent thevalidation error messages.
Declared In
MMValidationManager.hgetValidationMessagesAsString
- Iterates through each of the validation objects and calls its
- (NSString *)getValidationMessagesAsStringDiscussion
isValid:selector. For every object that fails validation, itserror message is added to an
NSArraywhich holds all the validationerror messages; which is then converted into a string.
*
- @return A string representing the error messages.
Declared In
MMValidationManager.h