Add one more param passed to validation functions which contains the current level struct.
although a small change, it is breaking so a new version v4 branch will be created to be consistent; it will allow for some other minor changes to be made at the same time for efficiency.