diff --git a/app/src/main/java/jackall/devrealm/viewmodel/ItemViewModel.kt b/app/src/main/java/jackall/devrealm/viewmodel/ItemViewModel.kt index de62ecd..6343593 100644 --- a/app/src/main/java/jackall/devrealm/viewmodel/ItemViewModel.kt +++ b/app/src/main/java/jackall/devrealm/viewmodel/ItemViewModel.kt @@ -14,9 +14,11 @@ init { person.addChangeListener { person -> - firstName.set(person.firstName) - lastName.set(person.lastName) - age.set(person.age.toString()) + if (person.isValid) { + firstName.set(person.firstName) + lastName.set(person.lastName) + age.set(person.age.toString()) + } } } } \ No newline at end of file