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

Context in PrepareForValidation always nil #589

Open
2 of 3 tasks
ahmed3mar opened this issue Feb 7, 2025 · 2 comments · May be fixed by goravel/framework#859, goravel/fiber#146 or goravel/gin#133
Open
2 of 3 tasks

Context in PrepareForValidation always nil #589

ahmed3mar opened this issue Feb 7, 2025 · 2 comments · May be fixed by goravel/framework#859, goravel/fiber#146 or goravel/gin#133

Comments

@ahmed3mar
Copy link

Before feedback (在反馈之前)

  • I've searched the existing Issues, Discussions and Google (我已经搜索了现有的 Issues, Discussions 和 Google)
  • The problem can be stably reproduced (这个问题可以被稳定复现)
  • The problem is generated after upgrading (问题是在升级之后产生的)

Operating System (操作系统)

MacOS

Golang Version (Go 版本)

1.24.x

Goravel Version (Goravel 版本)

v1.15.x

Describe The Problem (描述问题)

in requests the ctx in PrepareForValidation always nil

Reproduction Code (复现代码或截图)

func (r *UserRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	fmt.Println("PrepareForValidation")
	fmt.Println(ctx)
	return nil
}
@hwbrzzl
Copy link
Contributor

hwbrzzl commented Feb 8, 2025

Thanks! Good catch.

@hwbrzzl
Copy link
Contributor

hwbrzzl commented Feb 8, 2025

Please create fix PRs based on the v1.15.x branch, it will be released to v1.15.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 To do
2 participants