Add validateFun to parameters

This is used for checking semantics of polygon input data. Polygons must
be closed and consist of number-pairs (coordinates).