Fix validation for user.uid after composite key constraint