kernel/lib/Form.php
public function addConstraint($sName, $oConstraint)
    {
        if ($this->_aElement[$sName] instanceof Input || $this->_aElement[$sName] instanceof Textarea) {

            $this->_aElement[$sName]->setConstraint($oConstraint);
        }

        return $this;
    }
public function addConstraint($sName, $oConstraint)
    {
        if ($this->_aElement[$sName] instanceof Input || $this->_aElement[$sName] instanceof Textarea) {

            $this->_aElement[$sName]->setConstraint($oConstraint);
        }

        return $this;
    }
add constraint

@access public
@param  string $sName field name
@param  object $oConstraint constraint on the field
@return \Venus\lib\Form