src/PAGI/Node/Node.php
public function validateInputWith($name, \Closure $validation, $soundOnError = null)
    {
        $this->inputValidations[$name] = self::createValidatorInfo(
            $validation,
            $soundOnError
        );
        return $this;
    }
public function validateInputWith($name, \Closure $validation, $soundOnError = null)
    {
        $this->inputValidations[$name] = self::createValidatorInfo(
            $validation,
            $soundOnError
        );
        return $this;
    }
public function validateInputWith ( $ name , \ Closure $ validation , $ soundOnError = null ) { $ this -> inputValidations [ $ name ] = self :: createValidatorInfo ( $ validation , $ soundOnError ) ; return $ this ; }
Add an input validation to this node.

@param string $name A distrinctive name for this validator
@param \Closure $validation Callback to use for validation
@param string|null $soundOnError Optional sound to play on error

@return Node
Add an input validation to this node .