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 have @Validated(.isEmail) var email: String? { didSet { emailError = _email.isValid } }
in an ObservableObject
In a view I have a TextField linked to email
What did you expect to happen?
I expected the emailError to contains a bool & email to contains the text that was typed.
What happened instead?
emailError do contains a bool but it's always false because when I type, the letter disappears.
The value is present when I call willSet but isn't anymore in the didSet.
If I remove the call to isValid it works.
It works as expected on devices running 14.1 or lower but not on devices running 14.2
The text was updated successfully, but these errors were encountered:
As soon as ValidatedPropertyKit hits a 1.0 release this behavior will be changed so that the value only gets validated as soon as it gets accessed.
Please feel free to open up a PR.
ValidatedPropertyKit Environment
What did you do?
I have
@Validated(.isEmail) var email: String? { didSet { emailError = _email.isValid } }
in an ObservableObject
In a view I have a TextField linked to
email
What did you expect to happen?
I expected the emailError to contains a bool & email to contains the text that was typed.
What happened instead?
emailError do contains a bool but it's always false because when I type, the letter disappears.
The value is present when I call willSet but isn't anymore in the didSet.
If I remove the call to isValid it works.
It works as expected on devices running 14.1 or lower but not on devices running 14.2
The text was updated successfully, but these errors were encountered: