def METHOD_NAME(self, field):
    if field.data is None:
        return
    self._validate_min_max_choices()
    if field.data > len(self.options.data):
        raise ValidationError(_('Maximum choices must be fewer or equal than the total number of options.'))