Inherits from UITextView
Conforms to US2ValidatorTextViewPrivateDelegate
US2ValidatorUIProtocol
Declared in US2ValidatorTextView.h

Overview

The validator text view is the central object to use. It inherits UITextView 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 view, reports a violation the validatorTextViewDelegate will be served with this information. The validatorTextViewDelegate is of type US2ValidatorTextViewDelegate 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 NO it overrides the ‘shouldAllowViolation’ parameter of the conditions added to the validator. If set to YES the ‘shouldAllowViolation’ parameters of the conditions 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

US2ValidatorTextView.h

shouldAllowViolations

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.

@property (nonatomic, assign) BOOL shouldAllowViolations

Declared In

US2ValidatorTextView.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

US2ValidatorTextView.h

validator

Set the validator to check the text of the text field with

@property (nonatomic, retain) US2Validator *validator

Declared In

US2ValidatorTextView.h

validatorUIDelegate

Set delegate implementing US2ValidatorUIDelegate

@property (nonatomic, assign) id<US2ValidatorUIDelegate,UITextViewDelegate> validatorUIDelegate

Declared In

US2ValidatorTextView.h