-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
DatabaseRule "unique" fails quietly when given an incorrect column #52456
Comments
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
I have experience this issue several time and this can cause unexpected behavior and issues. So I opened a pull request #52500 which I wanted to do a while ago. Unfortunately it has been delayed merging. |
I believe the expected behavior should be to throw an error when an invalid column is specified. I reviewed @Lakshan-Madushanka's pull request #52500, and it seems to address this issue effectively. |
I don't think there's any action for us to take here as it's expected you provide a correct column name. |
Laravel Version
11.20.0
PHP Version
8.3.6
Database Driver & Version
PostgreSQL 16
Description
If I write a validation rule for a non-existent table, for eg:
The validator crashes with
SQLSTATE[HY000]: General error: 1 no such table: nonexistent
which is good enough. However, if I specify an existing table but a non-existent column, no errors or exceptions are thrown.Steps To Reproduce
To reproduce this bug:
The text was updated successfully, but these errors were encountered: