RBManagedFormValidator Class Reference

Inherits from NSObject
Declared in RBManagedFormValidator.h

Overview

A validator for an RBManagedFormView object.

  results

The result (NSNumber boolean) of each form field by it’s name.

@property (nonatomic, readonly, nonnull) NSDictionary<NSString*NSNumber*> *results

Discussion

The result (NSNumber boolean) of each form field by it’s name.

Declared In

RBManagedFormValidator.h

  messages

The error messages for each field that failed validation.

@property (nonatomic, readonly, nonnull) NSDictionary<NSString*NSString*> *messages

Discussion

The error messages for each field that failed validation.

Declared In

RBManagedFormValidator.h

  lastValues

The last form values that were validated.

@property (nonatomic, readonly, nonnull) NSDictionary *lastValues

Discussion

The last form values that were validated.

Declared In

RBManagedFormValidator.h

  formIsValid

Whether or not the last set of form values processed were valid.

@property (nonatomic, readonly) BOOL formIsValid

Discussion

Whether or not the last set of form values processed were valid.

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.

Discussion

Add a validation rule to the validator.

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.

Discussion

Remove all of the validation rules for the given field name.

Declared In

RBManagedFormValidator.h

– removeAllRules

Remove all validation rules.

- (void)removeAllRules

Discussion

Remove all validation rules.

Declared In

RBManagedFormValidator.h

– validateFormWithValues:

Validate the given set of form values.

- (void)validateFormWithValues:(nonnull NSDictionary *)values

Parameters

values

The form values to validate.

Discussion

Validate the given set of form values.

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.

Discussion

Validate the given form field with a value.

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.

Discussion

Whether or not the named field validated in the last set of values.

Declared In

RBManagedFormValidator.h