def METHOD_NAME(self, name, value):
    """
    ```
    if name == 'foo' and value != 'bar':
        raise PluginError('foo must be bar')
    return value
    ```
    """
    field = self.config[name]
    if value is None:
        if field.get("required"):
            raise PluginError("Field is required")
        return value
    if isinstance(value, str):
        value = value.strip()
        # TODO(dcramer): probably should do something with default
        # validations here, though many things will end up bring string
        # based
        if not value and field.get("required"):
            raise PluginError("Field is required")
    for validator in DEFAULT_VALIDATORS.get(field["type"], ()):
        value = validator(value=value)
    for validator in field.get("validators", ()):
        value = validator(value=value, **self.context)
    return value