You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need some way to validate my state property before I was doing it using propertywrappers that allow me add validation rules and run them when wrapped value changed
`
class Validatable {
// MARK: - Public Members
public let keyPath: AnyKeyPath
public var optional: Bool
public private(set) var isValid: Bool = true
public weak var owner: BaseViewModelProtocol?
public var wrappedValue: T? {
didSet {
validate()
owner?.propertyChanged?(keyPath)
}
}
public var projectedValue: AmeriaValidatable {
self
}
MARK: - Private Members
private var validators: [ValidationRule<T>] = []
}
`
can I do something like this in TCA or what is best way to do it in TCA
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I need some way to validate my state property before I was doing it using propertywrappers that allow me add validation rules and run them when wrapped value changed
`
class Validatable {
`
can I do something like this in TCA or what is best way to do it in TCA
Beta Was this translation helpful? Give feedback.
All reactions