//
//  RuleValueChangeModel.swift
//  MVMCoreUI
//
//  Created by Suresh, Kamlesh on 2/24/20.
//  Copyright © 2020 Verizon Wireless. All rights reserved.
//

import Foundation

public class RuleAllValueChangedModel: RulesProtocol {
    //--------------------------------------------------
    // MARK: - Properties
    //--------------------------------------------------
    
    public static var identifier: String = "allValueChanged"
    public var type: String = RuleAllValueChangedModel.identifier
    public var ruleId: String? 
    public var errorMessage: [String: String]?
    public var fields: [String]
    
    //--------------------------------------------------
    // MARK: - Validation
    //--------------------------------------------------
    
    public func isValid(_ formField: FormFieldProtocol) -> Bool {
        return formField.baseValue != formField.formFieldValue()
    }
}
