Skip to content

🎁 Add controlled vocab validator - #654

Merged
kirkkwang merged 1 commit into
mainfrom
add-controlled-vocab-validator
May 11, 2026
Merged

🎁 Add controlled vocab validator#654
kirkkwang merged 1 commit into
mainfrom
add-controlled-vocab-validator

Conversation

@kirkkwang

Copy link
Copy Markdown
Member

This commit will add a validator to check that values for controlled vocabularies are valid. We are hoping this is temporary until this is accepted into core Hyrax

Ref:

@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown

Test Results

      4 files  ±    0        4 suites  ±0   45s ⏱️ -2s
100 240 tests +2 364  100 237 ✅ +2 364  3 💤 ±0  0 ❌ ±0 
    295 runs  +    3      292 ✅ +    3  3 💤 ±0  0 ❌ ±0 

Results for commit 278d98f. ± Comparison against base commit 77a19dd.

♻️ This comment has been updated with latest results.

This commit will add a validator to check that values for controlled
vocabularies are valid.  We are hoping this is temporary until this is
accepted into core Hyrax

Ref:
- samvera/hyrax#7423
@kirkkwang
kirkkwang force-pushed the add-controlled-vocab-validator branch from 243b929 to 278d98f Compare May 11, 2026 17:44
# Remote authorities (e.g. Geonames) are out of scope.
class ControlledVocabularyValidator < ActiveModel::Validator
def validate(record)
return unless Flipflop.validate_local_controlled_vocabulary?

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.

so this works without returning true unless?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

correct

@laritakr laritakr 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.

non-blocking question

@kirkkwang
kirkkwang merged commit 71d19fe into main May 11, 2026
14 checks passed
@kirkkwang
kirkkwang deleted the add-controlled-vocab-validator branch May 11, 2026 18:42
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.

2 participants