ORKConfirmTextAnswerFormat Class Reference

Inherits from ORKTextAnswerFormat : ORKAnswerFormat : NSObject
Declared in ORKAnswerFormat_Private.h

The ORKConfirmTextAnswerFormat class represents the answer format for questions that collect a text response from the user and validates it with another text answer format.

An ORKConfirmTextAnswerFormat object produces an ORKBooleanQuestionResult object.

– initWithMaximumLength:

Returns an initialized text answer format using the specified maximum string length.

- (instancetype)initWithMaximumLength:(NSInteger)maximumLength

Parameters

maximumLength

The maximum number of characters to accept. When the value of this parameter is 0, there is no maximum.

Return Value

An initialized text answer format.

Discussion

This method is one of the designated initializers.

Declared In

ORKAnswerFormat.h

– initWithValidationRegex:invalidMessage:

Returns an initialized text answer format using the regular expression.

- (instancetype)initWithValidationRegex:(NSString *)validationRegex invalidMessage:(NSString *)invalidMessage

Parameters

validationRegex

The regular expression used to validate the text.

invalidMessage

The text presented to the user when invalid input is received.

Return Value

An initialized validated text answer format.

Discussion

This method is one of the designated initializers.

Declared In

ORKAnswerFormat.h

– initWithOriginalItemIdentifier:errorMessage:

Returns an initialized text answer format using the original item identifier.

- (instancetype)initWithOriginalItemIdentifier:(NSString *)originalItemIdentifier errorMessage:(NSString *)errorMessage

Parameters

originalItemIdentifier

The form item identifier against which this answer item is validated.

errorMessage

The error message displayed if validation fails.

Return Value

An initialized confirm text answer format.

Declared In

ORKAnswerFormat_Private.h

  originalItemIdentifier

The identifier for the form item that the current item will be validated against.

@property (nonatomic, copy, readonly) NSString *originalItemIdentifier

Declared In

ORKAnswerFormat_Private.h

  errorMessage

The error message displayed if validation fails.

@property (nonatomic, copy, readonly) NSString *errorMessage

Declared In

ORKAnswerFormat_Private.h