Created
May 22, 2019 11:10
-
-
Save saru2020/de2111b007616a3552862a6937f506e1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1 | |
let email = emailTextField.rx.text.orEmpty.asObservable() | |
//2 | |
let password = passwordTextField.rx.text.orEmpty.asObservable() | |
//3 | |
Observable.combineLatest(email, password) { (email, password) in | |
return email.isValidEmail() | |
&& password.isValidPassword() | |
} | |
.bind(to: loginButton.rx.isEnabled) | |
.disposed(by: disposeBag) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment