Created
January 19, 2018 22:06
-
-
Save dcampogiani/c511f06239b7a6d53a4cf27aced5a4db to your computer and use it in GitHub Desktop.
This file contains 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
class OptionViewModel : ViewModel() { | |
private val mutableValidation: MutableLiveData<Option<Data>> = MutableLiveData() | |
val validation: LiveData<Option<Data>> | |
get() = mutableValidation | |
fun validate(mail: String, phoneNumber: String) { | |
val validationResult : Option<Data> = validateData(mail, phoneNumber) | |
mutableValidation.value = validationResult | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment