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

Validate Value and ValueFromFieldPath are not nil #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

etesami
Copy link

@etesami etesami commented Feb 6, 2025

Description of your changes

Fixes #23

This PR adds validations to ensure proper field selection:

  • When ValueFromFieldPath is selected, the valueFromFieldPath field is checked to ensure it is not nil.
  • When Value is selected, the value field is verified to be non-nil.

I have:

@etesami etesami force-pushed the validate-fromcompositepath-or-value branch from 0049fb4 to 386d059 Compare February 6, 2025 01:21
Copy link
Collaborator

@phisco phisco left a comment

Choose a reason for hiding this comment

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

Good catch thanks!

fn.go Show resolved Hide resolved
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.

nil pointer dereference when using type: FromCompositeFieldPath and omitting valueFromFieldPath
2 participants