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

Refactored typeCheck to accept parent, fixing array/slice failing required check with empty values #436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LCartwright
Copy link

Q A
Documentation no
Bugfix yes
BC Break no
New Feature yes
RFC no
QA no

Description

Related too #334, the root cause seems to be that each element of an array is checked with isEmptyValue and fails the required check if it is empty. Meaning that an array of bytes containing a zero value of the byte type (0x00) will trigger the failure. Solution is to check the array against the zero type first, then ignore any empty values upon digging into each individual element of byte array. I've added a test to reproduce.

Note: IsExistingEmail tests fail for me on a fresh pull from master.

This is just a quick hack together, I welcome some advice on the direction here.

@LCartwright LCartwright force-pushed the fixed-zero-byte-values-triggering-required branch from 831149a to df06edd Compare February 10, 2021 10:20
@sergeyglazyrindev
Copy link

Hello guys!
I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back
Link to my repo: create issue there and we'll discuss it.

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.

2 participants