code/model/KapostObject.php
protected function validate() {
        $validator=parent::validate();
        
        //Verify we have a KapostRefID
        $kapostID=$this->KapostRefID;
        if(empty($kapostID)) {
            $validator->error(_t('KapostObject.MISSING_KAPOST_ID', '_Kapost Reference ID is missing'), 'missing-kapost-id');
        }
        
        return $validator;
    }
protected function validate() {
        $validator=parent::validate();
        
        //Verify we have a KapostRefID
        $kapostID=$this->KapostRefID;
        if(empty($kapostID)) {
            $validator->error(_t('KapostObject.MISSING_KAPOST_ID', '_Kapost Reference ID is missing'), 'missing-kapost-id');
        }
        
        return $validator;
    }
protected function validate ( ) { $ validator = parent :: validate ( ) ; //Verify we have a KapostRefID $ kapostID = $ this -> KapostRefID ; if ( empty ( $ kapostID ) ) { $ validator -> error ( _t ( 'KapostObject.MISSING_KAPOST_ID' , '_Kapost Reference ID is missing' ) , 'missing-kapost-id' ) ; } return $ validator ; }
Validates the current object, invalid objects will not be written. By default all Kapost objects are valid if they have a value in the KapostRefID
@return ValidationResult
@see DataObject::validate()
Validates the current object invalid objects will not be written . By default all Kapost objects are valid if they have a value in the KapostRefID