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

panic: interface conversion: interface {} is []uint8, not *validator.FieldValidator #112

Open
maanasasubrahmanyam-sd opened this issue Aug 27, 2021 · 0 comments

Comments

@maanasasubrahmanyam-sd
Copy link

maanasasubrahmanyam-sd commented Aug 27, 2021

In Plugin.go I am getting error on this function.
panic: interface conversion: interface {} is []uint8, not *validator.FieldValidator
Any suggestion on how to resolve this

func getFieldValidatorIfAny(field *descriptor.FieldDescriptorProto) *validator.FieldValidator {
	if field.Options != nil {
		v, err := proto.GetExtension(field.Options, validator.E_Field)
		if err == nil && v.(*validator.FieldValidator) != nil {
			return (v.(*validator.FieldValidator))
		}
	}
	return nil
}
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

No branches or pull requests

1 participant