diff --git a/EffectorForms/EffectorForm.swift b/EffectorForms/EffectorForm.swift index ac9ad26..b5ed8bd 100644 --- a/EffectorForms/EffectorForm.swift +++ b/EffectorForms/EffectorForm.swift @@ -66,13 +66,13 @@ public final class EffectorForm { public func field( keyPath: KeyPath, initialValue: @autoclosure @escaping () -> Value, - rule: ValidationRule? + rules: ValidationRule? ) -> EffectorFormField { EffectorFormField( .init( keyPath: keyPath, initialValue: initialValue(), - rules: rule != nil ? [rule!] : [] + rules: rules != nil ? [rules!] : [] ) ) } diff --git a/Tests/EffectorFormsTests/FormTests.swift b/Tests/EffectorFormsTests/FormTests.swift index 1ce0562..461e774 100644 --- a/Tests/EffectorFormsTests/FormTests.swift +++ b/Tests/EffectorFormsTests/FormTests.swift @@ -211,12 +211,12 @@ final class FormTests: XCTestCase { let email = form.field( keyPath: \.email, initialValue: "", - rule: .email() + rules: .email() ) let password = form.field( keyPath: \.password, initialValue: "", - rule: .min(6) + rules: .min(6) ) form.register(field: email)