Index

RBFormValidationRuleSchema.h

Classes


RBFormValidationRuleSchema

A managed form field validation rule schema.

Properties

The type of validation rule.
public type RBFormValidationRuleType { get set }

The failure message to use when the field is invalid.
public failureMessage NSString? { get set }

The validation context data.
public data Any? { get set }

Functions

Initializes a new managed form field validation rule schema with the given serialised dictionary schema.
@param schemaDictionary : The serialised dictionary schema.
@returns The initialized schema object.
- (nonnull instancetype)initWithSchemaDictionary:(nonnull NSDictionary *)schemaDictionary;

Creates a new validation rule schema that the field cannot be empty.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)nonEmptyRuleWithFailureMessage:(nonnull NSString *)failureMessage;

Creates a new validation rule schema that applies a regular expression to the field value.
@param regularExpression : The regular expression to match on the field value.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithRegularExpression:(nonnull NSString *)regularExpression

Creates a new validation rule schema that ensures a numeric field has a value in the given range.
@param minimumValue : The minimum value.
@param maximumValue : The maximum value.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithNumericRangeFrom:(double)minimumValue

Creates a new validation rule schema that ensures a numeric field has a minimum value.
@param minimumValue : The minimum value.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithNumericMinimumValue:(double)minimumValue

Creates a new validation rule schema that ensures a numeric field has a maximum value.
@param maximumValue : The maximum value.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithNumericMaximumValue:(double)maximumValue

Creates a new validation rule schema that enforces an image size range.
@param minimumSize : The minimum image size.
@param maximumSize : The maximum image size.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithImageSizeRangeFrom:(CGSize)minimumSize

Creates a new validation rule schema that enforces a minimum image size.
@param minimumSize : The minimum image size.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithImageMinimumSize:(CGSize)minimumSize

Creates a new validation rule schema that enforces a maximum image size.
@param maximumSize : The maximum image size.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithImageMaximumSize:(CGSize)maximumSize

Creates a new validation rule schema that enforces an image aspect ratio.
@param aspectRatio : The aspect ratio required of the image.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithImageAspectRatio:(double)aspectRatio

Creates a new validation rule schema that enforces a string length range.
@param minimumLength : The minimum string length.
@param maximumLength : The maximum string length.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithStringLengthRangeFrom:(NSUInteger)minimumLength

Creates a new validation rule schema that enforces a minimum string length
@param minimumLength : The minimum string length.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithStringLengthMinimumLength:(NSUInteger)minimumLength

Creates a new validation rule schema that enforces a maximum string length
@param maximumLength : The maximum string length.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithStringLengthMaximumLength:(NSUInteger)maximumLength

Creates a new validation rule schema that enforces an array count range.
@param minimumCount : The minimum number of elements.
@param maximumCount : The maximum number of elements.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithArrayCountRangeFrom:(NSUInteger)minimumCount

Creates a new validation rule schema that enforces a minimum array count.
@param minimumCount : The minimum number of elements.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithArrayCountMinimum:(NSUInteger)minimumCount

Creates a new validation rule schema that enforces a maximum array count.
@param maximumCount : The maximum number of elements.
@param failureMessage : The failure message to use when the field is invalid.
@returns The new validation rule.
+ (nonnull instancetype)ruleWithArrayCountMaximum:(NSUInteger)maximumCount