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>)validator
Discussion
*
- @param validator A validator object to be added to the validation manager.
Declared In
MMValidationManager.h
getValidationMessagesAsArray
- Iterates through each of the validation objects and calls its
- (NSArray *)getValidationMessagesAsArray
Discussion
isValid:
selector. For every object that fails validation, itserror message is added to an
NSArray
which holds all the validationerror messages.
*
@return A list of
NSString
objects that represent thevalidation error messages.
Declared In
MMValidationManager.h
getValidationMessagesAsString
- Iterates through each of the validation objects and calls its
- (NSString *)getValidationMessagesAsString
Discussion
isValid:
selector. For every object that fails validation, itserror message is added to an
NSArray
which holds all the validationerror messages; which is then converted into a string.
*
- @return A string representing the error messages.
Declared In
MMValidationManager.h