Skip to content

Match ValidationError API to the other components#34

Merged
koppen merged 1 commit intomainfrom
validation_api
Aug 26, 2025
Merged

Match ValidationError API to the other components#34
koppen merged 1 commit intomainfrom
validation_api

Conversation

@koppen
Copy link
Copy Markdown
Member

@koppen koppen commented Aug 23, 2025

Depends on #33

@koppen koppen requested a review from Copilot August 23, 2025 20:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR standardizes the ValidationError component API to use content blocks instead of message parameters, aligning it with other ViewComponent patterns. The change removes the explicit message parameter and leverages ViewComponent's built-in content mechanism.

  • Removes the message: parameter from ValidationError initialization
  • Updates all usage sites to pass content via blocks instead of parameters
  • Simplifies the component implementation by using ViewComponent's content method

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/components/flowbite/input/validation_error.rb Removes message parameter and uses content block pattern
app/components/flowbite/input_field/input_field.html.erb Updates ValidationError usage to block syntax
app/components/flowbite/input_field/checkbox.html.erb Updates ValidationError usage to block syntax
app/components/flowbite/input_field/radio_button.html.erb Updates ValidationError usage to block syntax
test/components/input/validation_error_test.rb Updates all test cases to use block syntax

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@koppen koppen requested review from RasmusDWN and olepalm August 23, 2025 20:33
Base automatically changed from streamline_validation to main August 26, 2025 09:03
@koppen koppen merged commit a25c179 into main Aug 26, 2025
@koppen koppen deleted the validation_api branch August 26, 2025 09:03
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.

3 participants