Skip to content

Conversation

@almas-x
Copy link
Contributor

@almas-x almas-x commented Nov 25, 2025

When JSON request bodies are decoded into map[string]interface{} numeric fields become float64. The enum/in validation only handled string, int and uint types, causing valid JSON numbers to fail validation unless callers explicitly converted them with Filters. This change keeps the existing convToBasicType attempt and, if that fails, falls back to converting the value to a string and re-using the same enum matching logic. It's a small, backward-compatible fix that lets in: rules work with numbers coming from JSON without requiring extra Filters.

This update addresses goravel/goravel#816

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.

1 participant