Skip to content

feat(preference): add SelectValidator for select/combobox inputs#1364

Merged
whoAbhishekSah merged 1 commit intomainfrom
feat/preference-select-validator
Feb 3, 2026
Merged

feat(preference): add SelectValidator for select/combobox inputs#1364
whoAbhishekSah merged 1 commit intomainfrom
feat/preference-select-validator

Conversation

@whoAbhishekSah
Copy link
Member

Summary

  • Add SelectValidator that validates preference values against allowed options in InputHints
  • Update GetValidator() to use SelectValidator for select and combobox input types
  • Add comprehensive unit tests for all validators (Boolean, Text, Select)

Details

  • SelectValidator parses comma-separated values from InputHints field
  • Validates that submitted value is one of the allowed options
  • If no InputHints configured, accepts any non-empty value
  • multiselect intentionally excluded (needs different parsing for multi-value input)

Test Plan

  • Unit tests pass: go test ./core/preference/... -v (27 tests)
  • Code compiles: go build ./...

🤖 Generated with Claude Code

Add SelectValidator that validates preference values against allowed
options defined in InputHints (comma-separated). This enables proper
validation for select and combobox trait input types.

- Add SelectValidator to validator.go
- Update GetValidator() to use SelectValidator for select/combobox
- Add comprehensive unit tests for all validators

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Feb 2, 2026 7:15am

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21580803602

Details

  • 18 of 18 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.08%) to 37.966%

Totals Coverage Status
Change from base Build 21512854764: 0.08%
Covered Lines: 15929
Relevant Lines: 41956

💛 - Coveralls

@whoAbhishekSah whoAbhishekSah merged commit 6d81c59 into main Feb 3, 2026
7 checks passed
@whoAbhishekSah whoAbhishekSah deleted the feat/preference-select-validator branch February 3, 2026 09:07
@whoAbhishekSah
Copy link
Member Author

#1347 linked

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