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

Set required on required form inputs #753

Merged
merged 1 commit into from
Oct 3, 2024
Merged

Conversation

eyeseast
Copy link
Contributor

@eyeseast eyeseast commented Oct 3, 2024

Closes #743

This should stop people from submitting forms with missing required fields.

Copy link

github-actions bot commented Oct 3, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 21.66% 6603 / 30479
🔵 Statements 21.66% 6603 / 30479
🔵 Functions 39.32% 140 / 356
🔵 Branches 56.81% 350 / 616
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/lib/components/forms/Edit.svelte 0% 0% 0% 0% 1-90
src/lib/components/forms/EditNote.svelte 0% 0% 0% 0% 1-107
src/lib/components/forms/EditProject.svelte 0% 0% 0% 0% 1-82
src/lib/components/forms/ManageCollaborators.svelte 0% 0% 0% 0% 1-182
src/lib/components/forms/Projects.svelte 0% 0% 0% 0% 1-166
Generated in workflow #544 for commit b34219b by the Vitest Coverage Report Action

Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for documentcloud-frontend ready!

Name Link
🔨 Latest commit b34219b
🔍 Latest deploy log https://app.netlify.com/sites/documentcloud-frontend/deploys/66fec6bb0470350008f8ebb2
😎 Deploy Preview https://deploy-preview-753.muckcloud.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@allanlasser allanlasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, solid fix 😄

This would be a separate task, but may want to layer in form/field validation as both a UX improvement and additional security/stability improvement. I've used zod before, although in my experience it doesn't play well with FormData. svelte-form would be another option.

@eyeseast
Copy link
Contributor Author

eyeseast commented Oct 3, 2024

That is a separate PR. I don't think we have an issue for it, though.

@eyeseast eyeseast merged commit 5b4a0ef into sveltekit Oct 3, 2024
9 of 10 checks passed
@eyeseast eyeseast deleted the 743-project-title branch October 3, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants