Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Validate button type in Button class, closes #159#160

Open
rvanbaalen wants to merge 1 commit into
validformbuilder:mastervalidformbuilder/validformbuilder:masterfrom
rvanbaalen:feat/disallow-custom-button-typesrvanbaalen/validformbuilder:feat/disallow-custom-button-typesCopy head branch name to clipboard
Open

Validate button type in Button class, closes #159#160
rvanbaalen wants to merge 1 commit into
validformbuilder:mastervalidformbuilder/validformbuilder:masterfrom
rvanbaalen:feat/disallow-custom-button-typesrvanbaalen/validformbuilder:feat/disallow-custom-button-typesCopy head branch name to clipboard

Conversation

@rvanbaalen

@rvanbaalen rvanbaalen commented Feb 27, 2025

Copy link
Copy Markdown
Member

Description

This pull request introduces validation for the button type in the Button class. It ensures the type is one of the allowed values: 'submit', 'button', or 'reset'. An InvalidArgumentException will be thrown for invalid types, preventing potential misconfigurations.

This closes #159

Checklist

  • Tests for the added functionality have been included
  • Documentation has been updated if necessary

Add a check to ensure the button type is one of the allowed values: 'submit', 'button', or 'reset'. Throw an InvalidArgumentException for invalid types, preventing potential misconfigurations.

@flangfeldt flangfeldt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No test for this new validation?

@rvanbaalen

Copy link
Copy Markdown
Member Author

Tests are part of the big draft PR.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only allow officially supported button types

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.