src/Schema.php
public function addFilter(string $fieldname, callable $callback, bool $validate = false) {
        $fieldname = $this->parseFieldSelector($fieldname);
        $this->filters[$fieldname][] = [$callback, $validate];
        return $this;
    }
public function addFilter(string $fieldname, callable $callback, bool $validate = false) {
        $fieldname = $this->parseFieldSelector($fieldname);
        $this->filters[$fieldname][] = [$callback, $validate];
        return $this;
    }
public function addFilter ( string $ fieldname , callable $ callback , bool $ validate = false ) { $ fieldname = $ this -> parseFieldSelector ( $ fieldname ) ; $ this -> filters [ $ fieldname ] [ ] = [ $ callback , $ validate ] ; return $ this ; }
Add a custom filter to change data before validation.

@param string $fieldname The name of the field to filter, if any.

If you are adding a filter to a deeply nested field then separate the path with dots.
@param callable $callback The callback to filter the field.
@param bool $validate Whether or not the filter should also validate. If true default validation is skipped.
@return $this
Add a custom filter to change data before validation .