Commit 8e3200d2 authored by Niklas Fix's avatar Niklas Fix 🎓

fix min password length in change pw

parent 1ed2fc1b
......@@ -5,6 +5,7 @@ import de.akamu.tudarmstadt.data.password.PasswordDataSource
import de.akamu.tudarmstadt.data.user.UserDataSource
import de.akamu.tudarmstadt.interactors.UserInteractor
import de.akamu.tudarmstadt.model.User
import de.akamu.tudarmstadt.util.Constants
class ChangePasswordPresenter(private val interactor: PasswordInteractor,
private val userInteractor: UserInteractor,
......@@ -63,7 +64,7 @@ class ChangePasswordPresenter(private val interactor: PasswordInteractor,
private fun isPasswordValid(newPw: String, newPw2: String) : Boolean {
if(newPw.isEmpty() || newPw2.isEmpty() || newPw.length < 8) {
if(newPw.isEmpty() || newPw2.isEmpty() || newPw.length < Constants.MIN_PASSWORD_LENGTH) {
view?.showPasswordTooShort()
return false
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment