docs: def validate_function(method, **kwargs):
      """
      Validate the field matches the result of calling the given method. Example::
  
          def myfunc(value, name):
              return value == name
  
          validator = validate_function(myfunc, name='tim')
  
      Essentially creates a validator that only accepts the name 'tim'.
  
      :param method: Method to call.
      :param kwargs: Additional keyword arguments passed to the method.
      :raises: ``ValidationError('function')``
      """
      def function_validator(field, data):
          if field.value is None:
              return
          if not method(field.value, **kwargs):
              raise ValidationError('function', function=method.__name__)
      return function_validator