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

Undefined validation function 'exists' on field 'Username' #32

Closed
CaiqueCoelho opened this issue Jun 6, 2023 · 1 comment
Closed

Undefined validation function 'exists' on field 'Username' #32

CaiqueCoelho opened this issue Jun 6, 2023 · 1 comment

Comments

@CaiqueCoelho
Copy link

When I try to call a post a request to http://localhost:8080/api/users I get the error :

Undefined validation function 'exists' on field 'Username'

I'm running the project with go run hello.go

And my JSON body is:

{"user":{"email":"caiquedpfc+16@gmail.com", "password":"test123", "username":"caique_coelho_15"}}

Does anyone know how to fix that?

@CaiqueCoelho
Copy link
Author

I was able to resolve my problem by doing a downgrade to gin-gonic/gin@v1.4.0 using:

go get github.com/gin-gonic/gin@v1.4.0
go build
./golang-gin-realworld-example-app  

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