Skip to content

Skip HTML5 required attribute for bool#13

Open
austins wants to merge 3 commits into
Finbuckle:mainfrom
austins:bool-checkbox-norequired
Open

Skip HTML5 required attribute for bool#13
austins wants to merge 3 commits into
Finbuckle:mainfrom
austins:bool-checkbox-norequired

Conversation

@austins

@austins austins commented May 27, 2026

Copy link
Copy Markdown

ASP.NET Core marks bool with RequiredAttribute internally when it's non-nullable. Don't add the HTML5 required attribute for bool as it would cause unchecked checkboxes to block form submission in the browser.

This matches the behavior of the built-in jQuery client-side validation, which allows form submission for unchecked state.

Addresses #12

@austins

austins commented May 27, 2026

Copy link
Copy Markdown
Author

@dotnet-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant