fix request validation function in database module