From d1b326b7ca96bd82ee406680f6f842bfb37238ca Mon Sep 17 00:00:00 2001 From: Rustam Giliaziev Date: Thu, 13 Jul 2023 13:24:01 +0400 Subject: [PATCH] feat: make validation param shortcut public --- EffectorForms/Set+ValidationEvent.swift | 2 +- Tests/EffectorFormsTests/FormTests.swift | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/EffectorForms/Set+ValidationEvent.swift b/EffectorForms/Set+ValidationEvent.swift index 79f5f26..ad96ae4 100644 --- a/EffectorForms/Set+ValidationEvent.swift +++ b/EffectorForms/Set+ValidationEvent.swift @@ -1,4 +1,4 @@ -extension Set where Element == ValidationEvent { +public extension Set where Element == ValidationEvent { static let all = Set(ValidationEvent.allCases) static let submit = Set([ValidationEvent.submit]) diff --git a/Tests/EffectorFormsTests/FormTests.swift b/Tests/EffectorFormsTests/FormTests.swift index e981aa4..1ce0562 100644 --- a/Tests/EffectorFormsTests/FormTests.swift +++ b/Tests/EffectorFormsTests/FormTests.swift @@ -786,13 +786,14 @@ final class FieldTests: XCTestCase { } func testValidateManually() async throws { - let field = createField( + let extractedExpr = createField( .init( keyPath: \SignInForm.email, initialValue: "", rules: [makeEmailValidationRule()] ) ) + let field = extractedExpr field.change("123")