Module: Label::SKOSXL::Validations
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- app/models/label/skosxl/validations.rb
Instance Method Summary collapse
Instance Method Details
#origin_has_to_be_escaped ⇒ Object
15 16 17 18 19 |
# File 'app/models/label/skosxl/validations.rb', line 15 def origin_has_to_be_escaped unless Origin.new(origin).valid? errors.add :base, I18n.t('txt.models.label.origin_invalid') end end |
#pref_label_language ⇒ Object
21 22 23 24 25 |
# File 'app/models/label/skosxl/validations.rb', line 21 def pref_label_language if language != ::Iqvoc::Concept.pref_labeling_languages.first.to_s && concepts_for_labeling_class(::Iqvoc::Concept::pref_labeling_class).any? errors.add :base, I18n.t('txt.models.label.pref_label_language') end end |