RBManagedFormValidationRuleSchema Class Reference
Inherits from | NSObject |
---|---|
Conforms to | NSCopying |
Declared in | RBManagedFormValidationRuleSchema.h |
type
The type of validation rule.
@property (nonatomic) RBManagedFormValidationRuleType type
Discussion
The type of validation rule.
Declared In
RBManagedFormValidationRuleSchema.h
failureMessage
The failure message to use when the field is invalid.
@property (nonatomic, nullable) NSString *failureMessage
Discussion
The failure message to use when the field is invalid.
Declared In
RBManagedFormValidationRuleSchema.h
data
The validation context data.
@property (nonatomic, nullable) id data
Discussion
The validation context data.
Declared In
RBManagedFormValidationRuleSchema.h
– initWithSchemaDictionary:
Initializes a new managed form field validation rule schema with the given serialised dictionary schema.
- (nonnull instancetype)initWithSchemaDictionary:(nonnull NSDictionary *)schemaDictionary
Parameters
schemaDictionary |
The serialised dictionary schema. |
---|
Return Value
The initialized schema object.
Discussion
Initializes a new managed form field validation rule schema with the given serialised dictionary schema.
Declared In
RBManagedFormValidationRuleSchema.h
– schemaDictionary
Serialises the managed form field validation rule schema to a dictionary.
- (nonnull NSDictionary *)schemaDictionary
Return Value
The serialised schema dictionary.
Discussion
Serialises the managed form field validation rule schema to a dictionary.
Declared In
RBManagedFormValidationRuleSchema.h
– newValidationRule
Creates a new RBManagedFormValidationRule
object from the schema.
- (nullable RBManagedFormValidationRule *)newValidationRule
Return Value
The new RBManagedFormValidationRule
object.
Discussion
Creates a new RBManagedFormValidationRule
object from the schema.
Declared In
RBManagedFormValidationRuleSchema.h
+ nonEmptyRuleWithFailureMessage:
Creates a new validation rule schema that the field cannot be empty.
+ (nonnull instancetype)nonEmptyRuleWithFailureMessage:(nonnull NSString *)failureMessage
Parameters
failureMessage |
The failure message to use when the field is invalid. |
---|
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that the field cannot be empty.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithRegularExpression:failureMessage:
Creates a new validation rule schema that applies a regular expression to the field value.
+ (nonnull instancetype)ruleWithRegularExpression:(nonnull NSString *)regularExpression failureMessage:(nonnull NSString *)failureMessage
Parameters
regularExpression |
The regular expression to match on the field value. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that applies a regular expression to the field value.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithNumericRangeFrom:to:failureMessage:
Creates a new validation rule schema that ensures a numeric field has a value in the given range.
+ (nonnull instancetype)ruleWithNumericRangeFrom:(double)minimumValue to:(double)maximumValue failureMessage:(nonnull NSString *)failureMessage
Parameters
minimumValue |
The minimum value. |
---|---|
maximumValue |
The maximum value. |
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that ensures a numeric field has a value in the given range.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithNumericMinimumValue:failureMessage:
Creates a new validation rule schema that ensures a numeric field has a minimum value.
+ (nonnull instancetype)ruleWithNumericMinimumValue:(double)minimumValue failureMessage:(nonnull NSString *)failureMessage
Parameters
minimumValue |
The minimum value. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that ensures a numeric field has a minimum value.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithNumericMaximumValue:failureMessage:
Creates a new validation rule schema that ensures a numeric field has a maximum value.
+ (nonnull instancetype)ruleWithNumericMaximumValue:(double)maximumValue failureMessage:(nonnull NSString *)failureMessage
Parameters
maximumValue |
The maximum value. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that ensures a numeric field has a maximum value.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithImageSizeRangeFrom:to:failureMessage:
Creates a new validation rule schema that enforces an image size range.
+ (nonnull instancetype)ruleWithImageSizeRangeFrom:(CGSize)minimumSize to:(CGSize)maximumSize failureMessage:(nonnull NSString *)failureMessage
Parameters
minimumSize |
The minimum image size. |
---|---|
maximumSize |
The maximum image size. |
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces an image size range.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithImageMinimumSize:failureMessage:
Creates a new validation rule schema that enforces a minimum image size.
+ (nonnull instancetype)ruleWithImageMinimumSize:(CGSize)minimumSize failureMessage:(nonnull NSString *)failureMessage
Parameters
minimumSize |
The minimum image size. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces a minimum image size.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithImageMaximumSize:failureMessage:
Creates a new validation rule schema that enforces a maximum image size.
+ (nonnull instancetype)ruleWithImageMaximumSize:(CGSize)maximumSize failureMessage:(nonnull NSString *)failureMessage
Parameters
maximumSize |
The maximum image size. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces a maximum image size.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithImageAspectRatio:failureMessage:
Creates a new validation rule schema that enforces an image aspect ratio.
+ (nonnull instancetype)ruleWithImageAspectRatio:(double)aspectRatio failureMessage:(nonnull NSString *)failureMessage
Parameters
aspectRatio |
The aspect ratio required of the image. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces an image aspect ratio.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithStringLengthRangeFrom:to:failureMessage:
Creates a new validation rule schema that enforces a string length range.
+ (nonnull instancetype)ruleWithStringLengthRangeFrom:(NSUInteger)minimumLength to:(NSUInteger)maximumLength failureMessage:(nonnull NSString *)failureMessage
Parameters
minimumLength |
The minimum string length. |
---|---|
maximumLength |
The maximum string length. |
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces a string length range.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithStringLengthMinimumLength:failureMessage:
Creates a new validation rule schema that enforces a minimum string length
+ (nonnull instancetype)ruleWithStringLengthMinimumLength:(NSUInteger)minimumLength failureMessage:(nonnull NSString *)failureMessage
Parameters
minimumLength |
The minimum string length. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces a minimum string length
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithStringLengthMaximumLength:failureMessage:
Creates a new validation rule schema that enforces a maximum string length
+ (nonnull instancetype)ruleWithStringLengthMaximumLength:(NSUInteger)maximumLength failureMessage:(nonnull NSString *)failureMessage
Parameters
maximumLength |
The maximum string length. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces a maximum string length
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithArrayCountRangeFrom:to:failureMessage:
Creates a new validation rule schema that enforces an array count range.
+ (nonnull instancetype)ruleWithArrayCountRangeFrom:(NSUInteger)minimumCount to:(NSUInteger)maximumCount failureMessage:(nonnull NSString *)failureMessage
Parameters
minimumCount |
The minimum number of elements. |
---|---|
maximumCount |
The maximum number of elements. |
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces an array count range.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithArrayCountMinimum:failureMessage:
Creates a new validation rule schema that enforces a minimum array count.
+ (nonnull instancetype)ruleWithArrayCountMinimum:(NSUInteger)minimumCount failureMessage:(nonnull NSString *)failureMessage
Parameters
minimumCount |
The minimum number of elements. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces a minimum array count.
Declared In
RBManagedFormValidationRuleSchema.h
+ ruleWithArrayCountMaximum:failureMessage:
Creates a new validation rule schema that enforces a maximum array count.
+ (nonnull instancetype)ruleWithArrayCountMaximum:(NSUInteger)maximumCount failureMessage:(nonnull NSString *)failureMessage
Parameters
maximumCount |
The maximum number of elements. |
---|---|
failureMessage |
The failure message to use when the field is invalid. |
Return Value
The new validation rule.
Discussion
Creates a new validation rule schema that enforces a maximum array count.
Declared In
RBManagedFormValidationRuleSchema.h