simplifying.
This commit is contained in:
parent
83d0786597
commit
acebc936d7
@ -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" }
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user