simplifying.

This commit is contained in:
Kevin G Christiano 2020-12-02 12:50:42 -05:00
parent 83d0786597
commit acebc936d7
2 changed files with 5 additions and 15 deletions

View File

@ -15,20 +15,14 @@ public protocol MoleculeModelProtocol: ModelProtocol {
public extension MoleculeModelProtocol {
var moleculeName: String {
get { Self.identifier }
}
var moleculeName: String { Self.identifier }
var accessibilityIdentifier: String? {
get { nil }
set { }
}
static var categoryName: String {
"\(MoleculeModelProtocol.self)"
}
static var categoryName: String { "\(MoleculeModelProtocol.self)" }
static var categoryCodingKey: String {
"moleculeName"
}
static var categoryCodingKey: String { "moleculeName" }
}

View File

@ -31,15 +31,11 @@ public protocol RulesProtocol: ModelProtocol {
public extension RulesProtocol {
var type: String {
get { Self.identifier }
}
var type: String { Self.identifier }
static var categoryCodingKey: String { "type" }
static var categoryName: String {
"\(RulesProtocol.self)"
}
static var categoryName: String { "\(RulesProtocol.self)" }
// Individual rule can override the function to validate based on the rule type.
func validate(_ fieldMolecules: [String: FormFieldProtocol]) -> Bool {