Changeset 2842

Show
Ignore:
Timestamp:
07/11/08 12:50:20 (4 months ago)
Author:
juliens
Message:

Ajout d'une methode dans le container des fields permettant de récupérer le formid

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Copix_3_0_X/utils/copix/field/CopixFieldContainer.class.php

    r2839 r2842  
    2929    public function setLabel ($pLabel) { 
    3030        $this->_label = $pLabel; 
     31    } 
     32     
     33    public function getFormId () { 
     34        return $this->_formId; 
    3135    } 
    3236     
     
    134138    public function check () { 
    135139        $this->_errors = true; 
     140        if ($this->getParam('require',false) && ($this->_localValue == null)) { 
     141            $this->_errors = new CopixErrorObject('Champs obligatoire'); 
     142        } 
    136143        if ($this->_objField->getValidators () != null) { 
    137             $this->_errors = $this->_objField->getValidators ()->check ($this->_localValue); 
     144            if ($this->_localValue != null) { 
     145                $this->_errors = $this->_objField->getValidators ()->check ($this->_localValue); 
     146            } 
    138147        } 
    139148        return $this->_errors;