A field for data entry.
SFormField is a model object of a field.
There are various field model types available:
SFormTextField: A field model with a NSString
SFormEmailField: A field model with an NSString
SFormNumberField: A field model with a NSNumber
SFormRangedNumberField: A field with an
valuelimited between a minimum and a maximum.
SFormBooleanField: A field model with a YES, NO decision represented as an
SFormChoiceField: A field model with a set of options, representing a choice as an
SFormPickerField: A field model allowing multiple sets of options, representing a choice in a given set of options with as an
SFormDateField: A field model with an NSDate
The currently failing validators on the field.
@property (nonatomic, strong, readonly) NSArray *currentlyFailingValidators
This array contains an array of objects conforming to
Whether the field is currently valid.
@property (nonatomic, assign, readonly) BOOL isValid
Whether this field is required.
@property (nonatomic, assign) BOOL required
If a field is required, a validator ensuring that the field is not empty will be added to the validaor array.
This defaults to
The title of this field.
@property (nonatomic, retain) NSString *title
An array of validators to be ran when
value is updated.
@property (nonatomic, copy) NSArray *validators
Warning: When updating the validators, they will run instantly to verify the currect