Inherits from NSObject
Conforms to SFormBooleanFieldValidator
Declared in SFormBooleanFieldComparisonValidator.h
Availability
Related samples

Overview

A validator that compares the validating boolean field’s input against a specified boolean field’s input.

Tasks

  •   invalidMessage

    A string representing the invalid message to provide.

    property
  •   toCompare

    The boolean field that we are comparing the validating boolean field’s input against.

    property
  •   validResult

    The result needed from the comparison to achieve positive validation.

    property
  • – initWithFieldToCompare:validResult:

    Returns an instance of this class that will compare the validating boolean field’s input against the input of a provided boolean field.

Properties

invalidMessage

A string representing the invalid message to provide.

@property (nonatomic, strong) NSString *invalidMessage

Declared In

SFormBooleanFieldComparisonValidator.h

toCompare

The boolean field that we are comparing the validating boolean field’s input against.

@property (nonatomic, readonly, retain) SFormBooleanField *toCompare

Declared In

SFormBooleanFieldComparisonValidator.h

validResult

The result needed from the comparison to achieve positive validation.

@property (nonatomic, readonly, assign) SFormComparisonRule validResult

Declared In

SFormBooleanFieldComparisonValidator.h

Instance Methods

initWithFieldToCompare:validResult:

Returns an instance of this class that will compare the validating boolean field’s input against the input of a provided boolean field.

- (instancetype)initWithFieldToCompare:(SFormBooleanField *)toCompare validResult:(SFormComparisonRule)validResult

Parameters

toCompare

The boolean field whose input will be compare with the validating boolean field’s input.

validResult

The comparison result that trigger provide positive validation.

Discussion

This validator calls the compare: method on the field’s value property, passing in the toCompare field’s value as the parameter. This validator will validate positively if the comparison result is the same as the valid result provided.

Declared In

SFormBooleanFieldComparisonValidator.h