Skip to content

[9.x] Fix validation on published field#792

Merged
duncanmcclean merged 1 commit into9.xfrom
published-validation
Mar 25, 2026
Merged

[9.x] Fix validation on published field#792
duncanmcclean merged 1 commit into9.xfrom
published-validation

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

This pull request fixes an issue where required_if:published,true validation rules don't work with the native "published" field on publishable Runway resources.

This was happening because when a Runway resource is publishable, the published field is a native/automatic field that isn't part of the blueprint. During validation, only fields defined in the blueprint are processed, so the published value wasn't available for conditional validation rules like required_if:published,true.

This PR fixes it by adding the published field to the blueprint before validation in both the store() and update() methods, mirroring the pattern already used in prepareModelForSaving().

Fixes #790

@duncanmcclean duncanmcclean merged commit 325e1b8 into 9.x Mar 25, 2026
3 of 16 checks passed
@duncanmcclean duncanmcclean deleted the published-validation branch March 25, 2026 12:54
@github-actions
Copy link
Copy Markdown

Released as part of v9.3.0.

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.

"required_if" validation rule does not work with native "published" field

1 participant