Conforms to UIAppearance
UIAppearanceContainer
Declared in US2ValidatorUIProtocol.h

Overview

A text user interface element must conform to US2ValidatorUIProtocol protocol methods. At the moment the framework supports UITextField and UITextView by using US2ValidatorTextField and US2ValidatorTextView.

Tasks

Instance Methods

frame

Set CGRect value

- (CGRect)frame

Declared In

US2ValidatorUIProtocol.h

isValid

Return whether the text is valid.

- (BOOL)isValid

Return Value

Returns the valid state of the text field

Declared In

US2ValidatorUIProtocol.h

setFrame:

Boundary to set as frame to text UI

- (void)setFrame:(CGRect)frame

Parameters

frame

Boundary to set as frame to text UI

Declared In

US2ValidatorUIProtocol.h

setShouldAllowViolations:

Determines whether text inputs can be made either by violating the conditions. Is this parameter NO it overrides the ‘shouldAllowViolation’ parameter of the conditions added to the validator. If set to YES the ‘shouldAllowViolation’ parameters of the conditions considered.

- (void)setShouldAllowViolations:(BOOL)shouldAllowViolation

Parameters

shouldAllowViolation

Boolean value

Declared In

US2ValidatorUIProtocol.h

setText:

String to set as text to text UI

- (void)setText:(NSString *)text

Parameters

text

String to set as text to text UI

Declared In

US2ValidatorUIProtocol.h

setValidateOnFocusLossOnly:

Determines whether the text has to be validated after leaving the text field or while editing. After a violation appeared after leaving the text field the text field will from now on validate while editing. Because the user knows now that a violation occurrs when using this text field.

- (void)setValidateOnFocusLossOnly:(BOOL)validateOnFocusLossOnly

Parameters

validateOnFocusLossOnly

Boolean value

Declared In

US2ValidatorUIProtocol.h

setValidator:

Validator to check the text of text UI conforming US2ValidatorUIProtocol

- (void)setValidator:(US2Validator *)validator

Parameters

validator

Validator to check the text of text UI conforming US2ValidatorUIProtocol

Declared In

US2ValidatorUIProtocol.h

setValidatorUIDelegate:

The validator UI delegate conforming US2ValidatorUIDelegate

- (void)setValidatorUIDelegate:(id<US2ValidatorUIDelegate>)validatorUIDelegate

Parameters

validatorUIDelegate

The validator UI delegate conforming US2ValidatorUIDelegate

Declared In

US2ValidatorUIProtocol.h

shouldAllowViolations

Set boolean value

- (BOOL)shouldAllowViolations

Declared In

US2ValidatorUIProtocol.h

text

Set string value

- (NSString *)text

Declared In

US2ValidatorUIProtocol.h

validateOnFocusLossOnly

Set boolean value

- (BOOL)validateOnFocusLossOnly

Declared In

US2ValidatorUIProtocol.h

validator

Set validator

- (US2Validator *)validator

Declared In

US2ValidatorUIProtocol.h

validatorUIDelegate

Return the delegate

- (id<US2ValidatorUIDelegate>)validatorUIDelegate

Return Value

Returns the validator UI delegate

Declared In

US2ValidatorUIProtocol.h