code: public function addConstraint($sName, $oConstraint)
      {
          if ($this->_aElement[$sName] instanceof Input || $this->_aElement[$sName] instanceof Textarea) {
  
              $this->_aElement[$sName]->setConstraint($oConstraint);
          }
  
          return $this;
      }
docs: add constraint
  
  @access public
  @param  string $sName field name
  @param  object $oConstraint constraint on the field
  @return \Venus\lib\Form