I'm encountering an issue in my Laravel application where the validation process stops working due to a "invalid input syntax for type uuid" error from Postgres. This occurs when I try to validate a UUID field using Laravel's validation rules, and the field fails validation due to an invalid UUID format.
Here's the relevant part of my validation rule:
'id' => ['required', new UUIDValidationRule, 'exists:table,id']
The problem seems to be that Laravel's validation system attempts to check database existence (exists:table,id) before validating the UUID format, leading to the Postgres error.