src/Schema.php
public function addValidator(string $fieldname, callable $callback) {
        $fieldname = $this->parseFieldSelector($fieldname);
        $this->validators[$fieldname][] = $callback;
        return $this;
    }
public function addValidator(string $fieldname, callable $callback) {
        $fieldname = $this->parseFieldSelector($fieldname);
        $this->validators[$fieldname][] = $callback;
        return $this;
    }
public function addValidator ( string $ fieldname , callable $ callback ) { $ fieldname = $ this -> parseFieldSelector ( $ fieldname ) ; $ this -> validators [ $ fieldname ] [ ] = $ callback ; return $ this ; }
Add a custom validator to to validate the schema.

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

If you are adding a validator to a deeply nested field then separate the path with dots.
@param callable $callback The callback to validate with.
@return Schema Returns `$this` for fluent calls.
Add a custom validator to to validate the schema .