comments
This commit is contained in:
parent
7a1c0dd0fd
commit
020030e669
@ -11,6 +11,9 @@ import MVMCore
|
|||||||
|
|
||||||
|
|
||||||
@objcMembers public class FormValidator: NSObject {
|
@objcMembers public class FormValidator: NSObject {
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Properties
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
static var defaultGroupName: String = "default"
|
static var defaultGroupName: String = "default"
|
||||||
var formRules: [FormGroupRule]?
|
var formRules: [FormGroupRule]?
|
||||||
@ -19,10 +22,18 @@ import MVMCore
|
|||||||
var groupWatchers: [FormGroupWatcherFieldProtocol] = []
|
var groupWatchers: [FormGroupWatcherFieldProtocol] = []
|
||||||
var radioButtonsModelByGroup: [String: RadioButtonSelectionHelper] = [:]
|
var radioButtonsModelByGroup: [String: RadioButtonSelectionHelper] = [:]
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
public init(_ formRules: [FormGroupRule]?) {
|
public init(_ formRules: [FormGroupRule]?) {
|
||||||
self.formRules = formRules
|
self.formRules = formRules
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Methods
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
/// Adds the form field to the validator.
|
/// Adds the form field to the validator.
|
||||||
public func add(_ field: FormFieldProtocol) {
|
public func add(_ field: FormFieldProtocol) {
|
||||||
if let fieldKey = field.fieldKey {
|
if let fieldKey = field.fieldKey {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user