Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Commit f2e3362

Browse files
author
kahverengi
committed
Fix register regex
1 parent fd9aaa2 commit f2e3362

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/kotlin/com/parnote/route/api/RegisterAPI.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ class RegisterAPI : Api() {
107107
return
108108
}
109109

110-
if (!name.matches(Regex("^[A-Za-z ]*$"))) {
110+
if (!name.matches(Regex("^[\\p{L} ]+$"))) {
111111
errorHandler.invoke(Error(ErrorCode.REGISTER_NAME_INVALID))
112112

113113
return
114114
}
115115

116-
if (!surname.matches(Regex("^[A-Za-z]*$"))) {
116+
if (!surname.matches(Regex("^[\\p{L}]+\$"))) {
117117
errorHandler.invoke(Error(ErrorCode.REGISTER_SURNAME_INVALID))
118118

119119
return
@@ -179,7 +179,7 @@ class RegisterAPI : Api() {
179179
return
180180
}
181181

182-
successHandler.invoke()
182+
// successHandler.invoke()
183183
}
184184

185185
private fun validateFormHandler(

0 commit comments

Comments
 (0)