This commit is contained in:
Kevin G Christiano 2020-04-09 12:53:37 -04:00
parent 7a1c0dd0fd
commit 020030e669

View File

@ -11,7 +11,10 @@ import MVMCore
@objcMembers public class FormValidator: NSObject {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
static var defaultGroupName: String = "default"
var formRules: [FormGroupRule]?
weak var delegate: FormHolderProtocol?
@ -19,10 +22,18 @@ import MVMCore
var groupWatchers: [FormGroupWatcherFieldProtocol] = []
var radioButtonsModelByGroup: [String: RadioButtonSelectionHelper] = [:]
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(_ formRules: [FormGroupRule]?) {
self.formRules = formRules
}
//--------------------------------------------------
// MARK: - Methods
//--------------------------------------------------
/// Adds the form field to the validator.
public func add(_ field: FormFieldProtocol) {
if let fieldKey = field.fieldKey {