Fix go implementation of EqualsField to check ANY value overlap (Elm behavior)#53
Merged
Fix go implementation of EqualsField to check ANY value overlap (Elm behavior)#53
Conversation
Add test cases to verify that EqualsField comparison should check if ANY value from one field matches ANY value from another field, aligning with Elm's behavior. Current Go implementation only compares first values, causing the test to fail. Test case shows: - skills: ["Go", "Elm"] - preferred_skills: ["Python", "Elm", "JavaScript"] - Expected: "Elm" overlap means condition is met (field hidden) - Current: "Go" != "Python" so condition fails (field visible) Equivalent Elm integration tests for EqualsField with multi-value fields passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update Go's EqualsField comparison to check if ANY value from one field matches ANY value from another field, matching Elm's behavior. Previous implementation: - Used values.Get() which only compared first values - fieldA[0] == fieldB[0] New implementation: - Iterates through all values from both fields - Returns true if any value overlaps - Handles both single-value and multi-value fields correctly This ensures consistent behavior between Go backend validation and Elm frontend logic for multi-select fields, checkboxes, etc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Deploy Preview for tiny-form-fields ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update Go's EqualsField comparison to check if ANY value from one
field matches ANY value from another field, matching Elm's behavior.
Previous implementation:
New implementation:
This ensures consistent behavior between Go backend validation
and Elm frontend logic for multi-select fields, checkboxes, etc.