Added remove to form validator
This commit is contained in:
parent
adb4ac1893
commit
fbd198a2be
@ -46,6 +46,13 @@ import MVMCore
|
|||||||
groupWatchers.append(action)
|
groupWatchers.append(action)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Removes the form field to the validator.
|
||||||
|
public func remove(_ field: FormFieldProtocol) {
|
||||||
|
if let fieldKey = field.fieldKey {
|
||||||
|
fields.removeValue(forKey: fieldKey)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Determines the type of item and adds it.
|
/// Determines the type of item and adds it.
|
||||||
private func insert(_ item: FormItemProtocol) {
|
private func insert(_ item: FormItemProtocol) {
|
||||||
if let item = item as? FormFieldProtocol {
|
if let item = item as? FormFieldProtocol {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user