src/Schema.php
public function addFormatFilter(string $format, callable $callback, bool $validate = false) {
        if (empty($format)) {
            throw new \InvalidArgumentException('The filter format cannot be empty.', 500);
        }

        $filter = "/format/$format";
        $this->filters[$filter][] = [$callback, $validate];

        return $this;
    }
public function addFormatFilter(string $format, callable $callback, bool $validate = false) {
        if (empty($format)) {
            throw new \InvalidArgumentException('The filter format cannot be empty.', 500);
        }

        $filter = "/format/$format";
        $this->filters[$filter][] = [$callback, $validate];

        return $this;
    }
public function addFormatFilter ( string $ format , callable $ callback , bool $ validate = false ) { if ( empty ( $ format ) ) { throw new \ InvalidArgumentException ( 'The filter format cannot be empty.' , 500 ) ; } $ filter = "/format/$format" ; $ this -> filters [ $ filter ] [ ] = [ $ callback , $ validate ] ; return $ this ; }
Add a custom filter for a schema format.

Schemas can use the `format` property to specify a specific format on a field. Adding a filter for a format
allows you to customize the behavior of that format.

@param string $format The format to filter.
@param callable $callback The callback used to filter values.
@param bool $validate Whether or not the filter should also validate. If true default validation is skipped.
@return $this
Add a custom filter for a schema format .