protected function validate_descidentifier($value) {
        if (!$this->get('id') && !get_string_manager()->string_exists($value, $this->get('desccomponent'))) {
            return new lang_string('invalidevidencedesc', 'core_competency');
        }

        return true;
    }
protected function validate_descidentifier($value) {
        if (!$this->get('id') && !get_string_manager()->string_exists($value, $this->get('desccomponent'))) {
            return new lang_string('invalidevidencedesc', 'core_competency');
        }

        return true;
    }
protected function validate_descidentifier ( $ value ) { if ( ! $ this -> get ( 'id' ) && ! get_string_manager ( ) -> string_exists ( $ value , $ this -> get ( 'desccomponent' ) ) ) { return new lang_string ( 'invalidevidencedesc' , 'core_competency' ) ; } return true ; }
Validate the description identifier.

Only validate string existence during create. If the string is removed later on we should
not prevent this model from being updated. Alternatively we could check if the string has
changed before performing the check but this overhead is not required for now.
An evidence should usually never be updated anyway.

@param  string $value
@return true|lang_string
Validate the description identifier .