RBManagedFormValidator Class Reference
Inherits from | NSObject |
---|---|
Declared in | RBManagedFormValidator.h |
results
The result (NSNumber boolean) of each form field by it’s name.
@property (nonatomic, readonly, nonnull) NSDictionary<NSString*NSNumber*> *results
Declared In
RBManagedFormValidator.h
messages
The error messages for each field that failed validation.
@property (nonatomic, readonly, nonnull) NSDictionary<NSString*NSString*> *messages
Declared In
RBManagedFormValidator.h
lastValues
The last form values that were validated.
@property (nonatomic, readonly, nonnull) NSDictionary *lastValues
Declared In
RBManagedFormValidator.h
formIsValid
Whether or not the last set of form values processed were valid.
@property (nonatomic, readonly) BOOL formIsValid
Declared In
RBManagedFormValidator.h
– addRule:toFieldWithIdentifier:
Add a validation rule to the validator.
- (void)addRule:(nonnull RBManagedFormValidationRule *)rule toFieldWithIdentifier:(nonnull NSString *)identifier
Parameters
rule |
The validation rule to add. |
---|---|
identifier |
The name of the identifier that this rule validates. |
Declared In
RBManagedFormValidator.h
– removeAllRulesForFieldWithIdentifier:
Remove all of the validation rules for the given field name.
- (void)removeAllRulesForFieldWithIdentifier:(nonnull NSString *)identifier
Parameters
identifier |
The identifier of the field. |
---|
Declared In
RBManagedFormValidator.h
– removeAllRules
Remove all validation rules.
- (void)removeAllRules
Declared In
RBManagedFormValidator.h
– validateFormWithValues:
Validate the given set of form values.
- (void)validateFormWithValues:(nonnull NSDictionary *)values
Parameters
values |
The form values to validate. |
---|
Declared In
RBManagedFormValidator.h
– validateFormFieldWithIdentifier:value:
Validate the given form field with a value.
- (BOOL)validateFormFieldWithIdentifier:(nonnull NSString *)identifier value:(nullable id)value
Parameters
identifier |
The identifier of the field. |
---|---|
value |
The current value of the field. |
Return Value
Whether or not the field value was valid.
Declared In
RBManagedFormValidator.h
– fieldIsValid:
Whether or not the named field validated in the last set of values.
- (BOOL)fieldIsValid:(nonnull NSString *)identifier
Parameters
identifier |
The identifier of the field. |
---|
Return Value
Whether the field was valid.
Declared In
RBManagedFormValidator.h