Skip to content

[6.x] Allow conditionally required connector fields - #16076

Merged
duncanmcclean merged 1 commit into
6.xfrom
16073
Nov 26, 2026
Merged

duncanmcclean merged 1 commit into
6.xfrom
16073

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request fixes an issue where connector fields using sometimes|required validation were always required, even when hidden by field conditions.

This was happening because the Connect page was submitting each connection's full value, including hidden fields (eg. triggered: null). Laravel's sometimes rule only skips keys which are missing entirely, so required would still fail.

This PR fixes it by submitting each connection's visible values instead, like we already do when saving entries, terms and globals. ConnectionFields reports its publish container's visible values up to the Edit page, which uses them when saving.

Amp thread: https://ampcode.com/threads/T-033b1ac3-a8fc-4d99-a442-9f7724a44316

Fixes #16073

@duncanmcclean duncanmcclean changed the title [6.x] Forms 2: Allow conditionally required connector fields [6.x] Allow conditionally required connector fields Nov 26, 2026
@duncanmcclean
duncanmcclean merged commit 373b77e into 6.x Nov 26, 2026
66 checks passed
@duncanmcclean
duncanmcclean deleted the 16073 branch November 26, 2026 16:59
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.

Conditional required validation in Forms 2.0 Connector configuration fields

2 participants