Skip to content

Commit

Permalink
[feature/#1029] 숫자만 입력하는 조건 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Jan 21, 2025
1 parent 92d3d57 commit a2fd491
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ internal fun AuthTextField(
BasicTextField(
value = labelText,
onValueChange = { newValue ->
val filteredValue = newValue.filter { it.isDigit() }
val maxLength = if (hintText.contains(PHONE_HINT_TEXT)) MAX_PHONE_NUMBER else MAX_CODE_NUMBER
if (newValue.length <= maxLength) {
onTextChange(newValue)
if (filteredValue.length <= maxLength) {
onTextChange(filteredValue)
}
},
singleLine = true,
Expand Down

0 comments on commit a2fd491

Please sign in to comment.