Module: SampleManifestExcel::Tags::Validator::Formatting

Extended by:
ActiveSupport::Concern
Included in:
SequencescapeExcel::SpecialisedField::I5, SequencescapeExcel::SpecialisedField::I7
Defined in:
app/sample_manifest_excel/sample_manifest_excel/tags/validator/formatting.rb

Overview

Formatting

Instance Method Summary collapse

Instance Method Details

#check_formattingObject


15
16
17
18
19
# File 'app/sample_manifest_excel/sample_manifest_excel/tags/validator/formatting.rb', line 15

def check_formatting
  return if value.blank?

  errors.add(:tag, 'must be a combination of A,C,G,T or N') unless value.match?(/\A[acgtnACGTN]+\z/)
end