vidalbenjoe
vidalbenjoe

Reputation: 975

Show validation on each UItextfield after tapping submit button using RxSwift

I am new to RxSwift and MVVM pattern, I would like to ask how do I show validation on each UItextfield after tapping submit button using RxSwift.

Upvotes: 0

Views: 165

Answers (1)

Daniel T.
Daniel T.

Reputation: 33979

Your view model should have an Observable<Bool> for each text field. It if emits false then the data in the field is invalid. These Observable<Bool>s should emit values every time the button's tap Observable triggers.

Upvotes: 0

Related Questions