Throws an error if rectangle is missing fields or they are not valid.
Checks:
width
height
rect
If rect has x,y, this value is checked as well.
Throws an error if rectangle is missing fields or they are not valid.
Checks:
width
andheight
must be defined onrect
If
rect
has x,y, this value is checked as well.