Skip to content

fix: beforeValidate deleting value when access returns false - #11549

Merged
JarrodMFlesch merged 8 commits into
mainfrom
fix/beforeValidate-value
Mar 5, 2025
Merged

JarrodMFlesch merged 8 commits into
mainfrom
fix/beforeValidate-value

Conversation

@JarrodMFlesch

@JarrodMFlesch JarrodMFlesch commented Mar 5, 2025 •

Copy link
Copy Markdown
Contributor

What?

Regression caused by #11433

If a beforeChange hook was checking for a missing or undefined value in order to change the value before inserting into the database, data could be lost.

Why?

In #11433 the logic for setting the fallback field value was moved above the logic that cleared the value when access control returned false.

How?

This change ensures that the fallback value is passed into the beforeValidate function and still available with the fallback value on siblingData if access control returns false.

Fixes #11543

@github-actions

github-actions Bot commented Mar 5, 2025

Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.27.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Field is set to null if the user does not have access

1 participant