Skip to content

Commit 65037a5

Browse files
authored
Merge pull request #641 from kaizumaki/feature/fix-login-check
classIdPatternの正規表現を多言語対応
2 parents 3add286 + ffd542c commit 65037a5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/BaseInputField.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export default Vue.extend({
142142
},
143143
computed: {
144144
prependIconColor(): string {
145-
const classIdPattern = /^[あ-]{6}$/
145+
const classIdPattern = /^[あ-んa-zㄅ-ㄩ]{6}$/
146146
if (this.type === 'classId') {
147147
if (!this.value || !classIdPattern.test(this.value)) return '#C01B61'
148148
}
@@ -162,7 +162,7 @@ export default Vue.extend({
162162
return '#BDBDBD'
163163
},
164164
textFieldColor(): string {
165-
const classIdPattern = /^[あ-]{6}$/
165+
const classIdPattern = /^[あ-んa-zㄅ-ㄩ]{6}$/
166166
if (this.type === 'classId') {
167167
if (!this.value || !classIdPattern.test(this.value)) return '#C01B61'
168168
}
@@ -179,7 +179,7 @@ export default Vue.extend({
179179
return '#0071C2'
180180
},
181181
prependIcon(): string {
182-
const classIdPattern = /^[あ-]{6}$/
182+
const classIdPattern = /^[あ-んa-zㄅ-ㄩ]{6}$/
183183
if (this.type === 'classId') {
184184
if (!this.value || !classIdPattern.test(this.value))
185185
return 'mdi-alert-circle'

src/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
color="#FFDB6C"
2222
width="56px"
2323
height="56px"
24-
:disabled="!/^[あ-]{6}$/.test(classId)"
24+
:disabled="!/^[あ-んa-zㄅ-ㄩ]{6}$/.test(classId)"
2525
:loading="loading"
2626
@click="loginToClass"
2727
>

0 commit comments

Comments
 (0)