def _validate_type_polygon(self, field, value): """ Enables validation for `polygon` data type. :param field: field name. :param value: field value. """ try: Polygon(value) except TypeError: self._error(field, "LineString not correct %s " % value)
def _validate_type_polygon(self, value): try: Polygon(value) return True except TypeError: pass