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

Form element toggles don't appear to be respected #925

Open
allisonking opened this issue Feb 4, 2025 · 0 comments
Open

Form element toggles don't appear to be respected #925

allisonking opened this issue Feb 4, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@allisonking
Copy link
Contributor

allisonking commented Feb 4, 2025

What went wrong, step-by-step?

  1. Click any "Create pub" button
  2. Without editing any values, click "Save"
  3. The form will submit but it should not because the form element toggles have not been toggled off—there should be an error that the fields are required.

What did you expect to happen?

Form should not submit. Might be related to

if (schema.type !== "string") {
return [slug, Type.Optional(schema)];
}
// this allows for empty strings, which happens when you enter something
// in an input field and then delete it
// TODO: reevaluate whether this should be "" or undefined
const schemaWithAllowedEmpty = Type.Union([schema, Type.Literal("")], {
error: schema.error ?? "Invalid value",
});

What URL can we use to see the issue?

What browser/operating system were you using?

Optional

Have any screenshots? (Attach them by dragging the image here)

Screen.Recording.2025-02-04.at.10.45.49.AM.mov

Who reported this? (If not you)

@allisonking allisonking added the bug Something isn't working label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant