can someone explain restrictions on a variable i have an equation

divide (x^3+5x-18) by (x-2)
it got x^2+3 with a remanider of 12 is this correct and what is the restrcition on the varible?

the restriction would have to say

x ≠ 2, or else you have just divided by zero

I used synthetic division and the division was exact so that
(x^3 + 5x - 18) ÷ (x-2) = x^2 + 2x + 9)

check by expanding:
(x-2)(x^2 + 5x - 18)