-
Notifications
You must be signed in to change notification settings - Fork 0
ファイルアップロードの上限に関する検証を修正:上限値0を防ぎ、適切なエラーメッセージを追加するようにしました #693
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
Conversation
Co-authored-by: naohanpen <[email protected]>
Co-authored-by: naohanpen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot 修正してください
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
方針がまとまっていないので、テストは消して大丈夫です
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the test file as requested. Commit 80b4be9
@@ -276,6 +276,7 @@ export const FormFieldEditor: FC<{ | |||
type="number" | |||
{...register(`items.${index}.limit`, { | |||
required: { value: true, message: "ファイル数上限を入力してください" }, | |||
min: { value: 1, message: "この設定では何も提出できません" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
エラーではなく、警告を表示するだけで送信(保存)はできるようにしてください。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from error to warning. Now shows orange warning message "この設定では何も提出できません" when limit is 0, but allows form submission. Commit 80b4be9
Co-authored-by: naohanpen <[email protected]>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Coverage Report
File Coverage
|
Deploying sos25-client with
|
Latest commit: |
1d8a293
|
Status: | ✅ Deploy successful! |
Preview URL: | https://90ba1a98.sos25-client.pages.dev |
Branch Preview URL: | https://copilot-fix-677.sos25-client.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem
Users could create file upload fields with a limit of 0, which doesn't make functional sense and causes confusion. The form editor allowed this invalid configuration both through the default value and lack of validation.
Solution
This PR implements a two-part fix:
1. Added Minimum Value Validation
2. Fixed Default Value
Impact
Technical Details
Fixes #677.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
downloads.sentry-cdn.com
node ./scripts/install.js
(dns block)node /home/REDACTED/work/sos24-client/sos24-client/node_modules/.bin/next build --no-lint
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.