US2ValidatorUIProtocol Protocol Reference
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
-
– setValidatorUIDelegate:
The validator UI delegate conforming US2ValidatorUIDelegate
required method -
– validatorUIDelegate
Return the delegate
required method -
– setValidator:
Validator to check the text of text UI conforming US2ValidatorUIProtocol
required method -
– validator
Set validator
required method -
– 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.
required method -
– shouldAllowViolations
Set boolean value
required method -
– isValid
Return whether the text is valid.
required method -
– 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.
required method -
– validateOnFocusLossOnly
Set boolean value
required method -
– setText:
required method -
– text
Set string value
required method -
– setFrame:
required method -
– frame
Set CGRect value
required method
Instance Methods
isValid
Return whether the text is valid.
- (BOOL)isValid
Return Value
Returns the valid state of the text field
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
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
validateOnFocusLossOnly
Set boolean value
- (BOOL)validateOnFocusLossOnly
Declared In
US2ValidatorUIProtocol.h
validatorUIDelegate
Return the delegate
- (id<US2ValidatorUIDelegate>)validatorUIDelegate
Return Value
Returns the validator UI delegate
Declared In
US2ValidatorUIProtocol.h