Skip to content

Commit

Permalink
#11 / [CHORE] private 설정하기
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchbreeze committed Jun 9, 2023
1 parent 0c912ba commit 28ad915
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ class SignUpViewModel : ViewModel() {
val nameText: MutableLiveData<String> = MutableLiveData("")
val skillText: MutableLiveData<String> = MutableLiveData("")

val isIdValid: LiveData<Boolean> = Transformations.map(idText) { checkIdValid(it) }
val isPwValid: LiveData<Boolean> = Transformations.map(pwText) { checkPwValid(it) }
val isIdValid: LiveData<Boolean> = Transformations.map(idText) { id ->
checkIdValid(id)
}
val isPwValid: LiveData<Boolean> = Transformations.map(pwText) { pw ->
checkPwValid(pw)
}

val isButtonValid: MutableLiveData<Boolean> = MutableLiveData(false)

Expand Down Expand Up @@ -71,7 +75,7 @@ class SignUpViewModel : ViewModel() {
}

companion object {
const val ID_PATTERN = """^(?=.*[a-zA-Z])(?=.*\d).{6,10}$"""
const val PW_PATTERN = """^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()?]).{6,12}$"""
private const val ID_PATTERN = """^(?=.*[a-zA-Z])(?=.*\d).{6,10}$"""
private const val PW_PATTERN = """^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()?]).{6,12}$"""
}
}

0 comments on commit 28ad915

Please sign in to comment.