Check if a drag or resize is valid or not.

Created a callback function isValidMove(event, $element, dimensions) which is called on dragstop and resizestop to check if the new position/size is valid or not.