US2ValidatorTextField Class Reference
Inherits from | UITextField |
Conforms to | US2ValidatorTextFieldPrivateDelegate US2ValidatorUIProtocol |
Declared in | US2ValidatorTextField.h |
Overview
The validator text field is the central object to use. It inherits UITextField and listens internally to all own changes. After every change it validates the changed text material. When a validator, which was added to the validator text field, reports a violation the validatorTextFieldDelegate will be served with this information. The validatorTextFieldDelegate is of type US2ValidatorTextFieldDelegate and returns what went wrong and in which status the validation text field is at the moment.
Tasks
-
validatorUIDelegate
Set delegate implementing US2ValidatorUIDelegate
property -
validator
Set the validator to check the text of the text field with
property -
shouldAllowViolations
Determines whether text inputs can be made either by violating the conditions. Is this parameter is NO it overrides the ‘shouldAllowViolation’ parameter of the conditions added to the validator. If set to YES the ‘shouldAllowViolation’ parameters of the conditions are considered.
property -
isValid
Return whether the text is valid.
property -
validateOnFocusLossOnly
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.
property
Properties
isValid
Return whether the text is valid.
@property (nonatomic, assign, readonly) BOOL isValid
Return Value
Returns the valid state of the text field
Declared In
US2ValidatorTextField.h
shouldAllowViolations
Determines whether text inputs can be made either by violating the conditions. Is this parameter is NO it overrides the ‘shouldAllowViolation’ parameter of the conditions added to the validator. If set to YES the ‘shouldAllowViolation’ parameters of the conditions are considered.
@property (nonatomic, assign) BOOL shouldAllowViolations
Declared In
US2ValidatorTextField.h
validateOnFocusLossOnly
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.
@property (nonatomic, assign) BOOL validateOnFocusLossOnly
Declared In
US2ValidatorTextField.h
validator
Set the validator to check the text of the text field with
@property (nonatomic, retain) US2Validator *validator
Declared In
US2ValidatorTextField.h
validatorUIDelegate
Set delegate implementing US2ValidatorUIDelegate
@property (nonatomic, assign) id<US2ValidatorUIDelegate,UITextFieldDelegate> validatorUIDelegate
Declared In
US2ValidatorTextField.h