Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

電話番号の正規表現に問題がある。 #1105

Open
CaffeeLake opened this issue Apr 28, 2023 · 1 comment
Open

電話番号の正規表現に問題がある。 #1105

CaffeeLake opened this issue Apr 28, 2023 · 1 comment
Labels

Comments

@CaffeeLake
Copy link
Member

emergencyPhoneNumber: useStateWithValidate(user?.emergencyPhoneNumber ?? '', (value) => /^(0[5-9]0[0-9]{8}|0[1-9][1-9][0-9]{7})$/.test(value)),

08000000000など、簡単に正規表現を回避できるほか、
DB上だと最近登録した人の中で0000000000の人がいて、正規表現を回避している人も存在している。

@CaffeeLake
Copy link
Member Author

-0000-とかは例外として外す必要があるほか、バックエンド側にも登録時に正規表現の確認をする必要があるかも。
(リクエストを編集すれば回避できるので。)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant