Skip to content

Commit

Permalink
Fixed validation with invalid preset values
Browse files Browse the repository at this point in the history
  • Loading branch information
sanzaru committed Oct 17, 2024
1 parent 23b303a commit 05f752c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Formify/FormifyField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public struct FormifyField {

public init(_ initialValue: String = "", operators: [FormifyOperator] = []) {
self.value = initialValue
self.isTouched = !initialValue.isEmpty

operators.forEach {
switch $0 {
Expand All @@ -59,6 +60,8 @@ public struct FormifyField {
disableTrimming = true
}
}

validate()
}
}

Expand Down

0 comments on commit 05f752c

Please sign in to comment.