Related too https://github.com/asaskevich/govalidator/issues/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.
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.
Description
Related too https://github.com/asaskevich/govalidator/issues/334, the root cause seems to be that each element of an array is checked with
isEmptyValue
and fails therequired
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 ofbyte
array. I've added a test to reproduce.Note:
IsExistingEmail
tests fail for me on a fresh pull frommaster
.This is just a quick hack together, I welcome some advice on the direction here.