Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[validation] Add new assetRequired-flag #1285

Merged
merged 1 commit into from May 3, 2019
Merged

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Apr 29, 2019

When you have an image or a file field with custom metadata fields attached, required() will still yield true if you have set one of those fields. This PR introduces assetRequired(), which requires that the actual asset field is set and has a _ref.

Copy link
Contributor

@thomax thomax left a comment

Choose a reason for hiding this comment

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

Nice work, LGTM

@rexxars rexxars merged commit 36428e8 into next May 3, 2019
@rexxars rexxars deleted the validation-asset-required branch May 3, 2019 08:35
bjoerge pushed a commit that referenced this pull request Aug 13, 2019
@nickgriffiths
Copy link

I just came across this and found it useful. I couldn't find it in the documentation. Do you think it's worth adding it, or was I looking in the wrong place?

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.

None yet

3 participants