ユーザー名の少なくとも3文字以上という制限を撤廃
This commit is contained in:
parent
d90ad34924
commit
b9a676a1c1
|
@ -148,7 +148,7 @@ common:
|
||||||
unavailable: "既に利用されています"
|
unavailable: "既に利用されています"
|
||||||
error: "通信エラー"
|
error: "通信エラー"
|
||||||
invalid-format: "a~z、A~Z、0~9、_が使えます"
|
invalid-format: "a~z、A~Z、0~9、_が使えます"
|
||||||
too-short: "3文字以上でお願いします!"
|
too-short: "1文字以上でお願いします!"
|
||||||
too-long: "20文字以内でお願いします"
|
too-long: "20文字以内でお願いします"
|
||||||
password: "パスワード"
|
password: "パスワード"
|
||||||
password-placeholder: "8文字以上を推奨します"
|
password-placeholder: "8文字以上を推奨します"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<form class="mk-signup" @submit.prevent="onSubmit" autocomplete="off">
|
<form class="mk-signup" @submit.prevent="onSubmit" autocomplete="off">
|
||||||
<label class="username">
|
<label class="username">
|
||||||
<p class="caption">%fa:at%%i18n:common.tags.mk-signup.username%</p>
|
<p class="caption">%fa:at%%i18n:common.tags.mk-signup.username%</p>
|
||||||
<input v-model="username" type="text" pattern="^[a-zA-Z0-9_]{3,20}$" placeholder="a~z、A~Z、0~9、-" autocomplete="off" required @input="onChangeUsername"/>
|
<input v-model="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" placeholder="a~z、A~Z、0~9、-" autocomplete="off" required @input="onChangeUsername"/>
|
||||||
<p class="profile-page-url-preview" v-if="shouldShowProfileUrl">{{ `${url}/@${username}` }}</p>
|
<p class="profile-page-url-preview" v-if="shouldShowProfileUrl">{{ `${url}/@${username}` }}</p>
|
||||||
<p class="info" v-if="usernameState == 'wait'" style="color:#999">%fa:spinner .pulse .fw%%i18n:common.tags.mk-signup.checking%</p>
|
<p class="info" v-if="usernameState == 'wait'" style="color:#999">%fa:spinner .pulse .fw%%i18n:common.tags.mk-signup.checking%</p>
|
||||||
<p class="info" v-if="usernameState == 'ok'" style="color:#3CB7B5">%fa:check .fw%%i18n:common.tags.mk-signup.available%</p>
|
<p class="info" v-if="usernameState == 'ok'" style="color:#3CB7B5">%fa:check .fw%%i18n:common.tags.mk-signup.available%</p>
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
<b-form-input v-model="name" type="text" placeholder="ex) Misskey for iOS" autocomplete="off" required/>
|
<b-form-input v-model="name" type="text" placeholder="ex) Misskey for iOS" autocomplete="off" required/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group label="ID" description="あなたのアプリのID。">
|
<b-form-group label="ID" description="あなたのアプリのID。">
|
||||||
<b-input v-model="nid" type="text" pattern="^[a-zA-Z0-9_]{3,30}$" placeholder="ex) misskey-for-ios" autocomplete="off" required/>
|
<b-input v-model="nid" type="text" pattern="^[a-zA-Z0-9_]{1,30}$" placeholder="ex) misskey-for-ios" autocomplete="off" required/>
|
||||||
<p class="info" v-if="nidState == 'wait'" style="color:#999">%fa:spinner .pulse .fw%確認しています...</p>
|
<p class="info" v-if="nidState == 'wait'" style="color:#999">%fa:spinner .pulse .fw%確認しています...</p>
|
||||||
<p class="info" v-if="nidState == 'ok'" style="color:#3CB7B5">%fa:fw check%利用できます</p>
|
<p class="info" v-if="nidState == 'ok'" style="color:#3CB7B5">%fa:fw check%利用できます</p>
|
||||||
<p class="info" v-if="nidState == 'unavailable'" style="color:#FF1161">%fa:fw exclamation-triangle%既に利用されています</p>
|
<p class="info" v-if="nidState == 'unavailable'" style="color:#FF1161">%fa:fw exclamation-triangle%既に利用されています</p>
|
||||||
<p class="info" v-if="nidState == 'error'" style="color:#FF1161">%fa:fw exclamation-triangle%通信エラー</p>
|
<p class="info" v-if="nidState == 'error'" style="color:#FF1161">%fa:fw exclamation-triangle%通信エラー</p>
|
||||||
<p class="info" v-if="nidState == 'invalid-format'" style="color:#FF1161">%fa:fw exclamation-triangle%a~z、A~Z、0~9、_が使えます</p>
|
<p class="info" v-if="nidState == 'invalid-format'" style="color:#FF1161">%fa:fw exclamation-triangle%a~z、A~Z、0~9、_が使えます</p>
|
||||||
<p class="info" v-if="nidState == 'min-range'" style="color:#FF1161">%fa:fw exclamation-triangle%3文字以上でお願いします!</p>
|
<p class="info" v-if="nidState == 'min-range'" style="color:#FF1161">%fa:fw exclamation-triangle%1文字以上でお願いします!</p>
|
||||||
<p class="info" v-if="nidState == 'max-range'" style="color:#FF1161">%fa:fw exclamation-triangle%30文字以内でお願いします</p>
|
<p class="info" v-if="nidState == 'max-range'" style="color:#FF1161">%fa:fw exclamation-triangle%30文字以内でお願いします</p>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group label="アプリの概要" description="あなたのアプリの簡単な説明や紹介。">
|
<b-form-group label="アプリの概要" description="あなたのアプリの簡単な説明や紹介。">
|
||||||
|
|
|
@ -24,7 +24,7 @@ export type IApp = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export function isValidNameId(nameId: string): boolean {
|
export function isValidNameId(nameId: string): boolean {
|
||||||
return typeof nameId == 'string' && /^[a-zA-Z0-9_]{3,30}$/.test(nameId);
|
return typeof nameId == 'string' && /^[a-zA-Z0-9_]{1,30}$/.test(nameId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -89,7 +89,7 @@ export const isRemoteUser = (user: any): user is IRemoteUser =>
|
||||||
|
|
||||||
//#region Validators
|
//#region Validators
|
||||||
export function validateUsername(username: string): boolean {
|
export function validateUsername(username: string): boolean {
|
||||||
return typeof username == 'string' && /^[a-zA-Z0-9_]{3,20}$/.test(username);
|
return typeof username == 'string' && /^[a-zA-Z0-9_]{1,20}$/.test(username);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function validatePassword(password: string): boolean {
|
export function validatePassword(password: string): boolean {
|
||||||
|
|
Loading…
Reference in New Issue