Gregwar\Formidable\Fields\Field::addConstraint PHP 메소드

addConstraint() 공개 메소드

public addConstraint ( $closure )
    public function addConstraint($closure)
    {
        if (!$closure instanceof \Closure) {
            throw new \InvalidArgumentException('addConstraint() argument should be a \\Closure');
        }
        $this->constraints[] = $closure;
    }