-
Notifications
You must be signed in to change notification settings - Fork 35
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
🐛 Questionnaire validation should tolerate order
fields having value 0
#575
🐛 Questionnaire validation should tolerate order
fields having value 0
#575
Conversation
Signed-off-by: Sam Lucidi <slucidi@redhat.com>
43c1dbd
to
bd16526
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VISACK
@@ -47,3 +47,7 @@ var ( | |||
} | |||
Samples = []api.Questionnaire{Questionnaire1} | |||
) | |||
|
|||
func uint2ptr(u uint) *uint { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should use https://pkg.go.dev/github.com/gotidy/ptr instead of writing our own?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Test failures are known to be unrelated to this PR. Merging. |
The
required
binding validation can't differentiate an int with value 0 from a value that isn't present. Updateorder
fields on questionnaire structs to be represented as a pointer that must not be nil. Also disableexcluded_with
validations that don't work on 0 length slices.