Branch Coverage

blib/lib/MARC/Errorchecks.pm
Criterion Covered Total %
branch 423 878 48.1


line true false branch
214 5 56 if ($record->field('040'))
216 0 5 if ($field040->subfield('e'))
217 0 0 if ($field040->subfield('e') =~ /^rda$/)
263 0 34 unless $tag =~ /^[0-9][0-9][0-9]$/
265 3 31 if $tag <= 10
267 0 31 if $tag eq '856'
281 1 38 if ($subdata =~ /\.\.+/ and not $subdata =~ /\.\.\.[^\.]*/)
287 0 39 if ($subdata =~ /\,\,+/)
331 0 34 unless $tag =~ /^[0-9][0-9][0-9]$/
333 3 31 if $tag <= 10
335 0 31 if $tag eq '035'
337 0 31 if $tag eq '787'
353 2 37 if (my(@internal_spaces) = $subdata =~ /(.{0,10} +?.{0,10})/g)
355 2 0 unless $tag eq '260' and $subdata =~ /\<.*?\>/
362 1 38 if ($subdata =~ /^ /)
364 0 1 if $tag eq '016'
406 0 34 unless $tag =~ /^[0-9][0-9][0-9]$/
408 3 31 if $tag <= 10
410 0 31 if $tag eq '016'
422 2 29 if ($data =~ /\s+$/)
459 1 1 if $record->field('006')
461 1 1 unless @fields006
465 2 52 if (not length $field006_string eq 18) { }
514 1 0 if $record->field('008')
517 0 1 unless ($field008)
579 0 17 if (not $record->field('010') && $record->field('010')->subfield('a')) { }
593 0 17 unless ($1)
603 9 8 if ($subfielda =~ /^\d{8}$/) { }
8 0 elsif ($subfielda =~ /^\d{10}$/) { }
629 2 6 if ($year < 2001 or $year > $current_year) { }
643 2 15 if (@warningstoreturn)
650 3 12 if ($orig010a eq $cleaned010a) { }
2 10 elsif ($orig010a =~ /[^ 0-9]/) { }
658 0 2 if (not $subfielda =~ /^[ \d]*$/) { }
2 0 elsif ($orig010a_lccn eq $cleaned010a) { }
705 0 1 if ($encodelvl eq '8')
710 1 0 if ($record->field('300')) { }
721 1 0 if (@fields4xx and not $newsubfields[-1] =~ /\.$/) { }
0 0 elsif ($newsubfields[-1] =~ /\)\.$/ and not @fields4xx) { }
0 0 elsif (is_RDA($record) and $newsubfields[-1] =~ /\.$/ and not @fields4xx) { }
820 0 1 if ($encodelvl eq '8') { }
0 1 elsif ($mattype ne 'a') { }
831 1 0 if $record->field('008')
832 0 1 unless $field008
834 0 1 if ($record->subfield('245', 'h') and $record->subfield('245', 'h') =~ /\[electronic resource\]/)
843 1 0 if ($record->field('300')) { }
847 1 0 if $field300->subfield('a')
848 1 0 if $field300->subfield('b')
849 1 0 if $field300->subfield('c')
856 1 0 if ($subfielda) { }
857 1 0 unless ($is_electronic == 1)
858 1 0 if (not $record_is_RDA) { }
860 1 0 unless $subfielda =~ /\(?.*\b[pv]\.[,\) ]?/ or $subfielda =~ /\(?.*\bcolumns?\)?/ or $subfielda =~ / leaves / or $subfielda =~ / leaf /
867 0 1 if ($subfielda =~ /\(((?:unpaged)|(?:various pagings))\) p\.?\b/)
873 0 0 unless $subfielda =~ /\(?.*\bpages?[,\) ]?/ or $subfielda =~ /\(?.*\bvolumes?[,\) ]?/ or $subfielda =~ /\(?.*\bcolumns?\)?/ or $subfielda =~ / leaves / or $subfielda =~ / leaf /
881 0 0 if ($subfielda =~ /\(((?:unpaged)|(?:various pagings))\) p\.?\b/)
893 1 0 if ($subfieldc) { }
894 1 0 if (not $record_is_RDA) { }
895 1 0 unless $subfieldc =~ /\d+ (([cm]m\.)|(in\.))/
898 0 0 unless $subfieldc =~ /\d+ (([cm]m)|(in\.))/
908 1 0 if (not $record_is_RDA) { }
909 1 0 if ($subfieldb and $subfieldb =~ /col[^\.]/)
914 0 0 if ($subfieldb and $subfieldb =~ /col\./)
920 0 1 if ($illcodes =~ /^\s{4}$/ and not $subfieldb) { }
0 1 elsif ($illcodes =~ /^\s{4}$/ and $subfieldb) { }
0 1 elsif ($illcodes =~ /[a-e,g-m,o,p]/ and not $subfieldb) { }
1 0 elsif ($illcodes =~ /[a-e,g-m,o,p]/ and $subfieldb) { }
0 0 elsif ($illcodes =~ /f/ and $subfielda) { }
933 1 0 if @$illcodewarnref
936 0 1 if ($illcodes =~ /f/ and $subfielda)
938 0 0 unless ($subfielda =~ /plate/)
946 0 0 unless ($subfielda =~ /plate/)
1012 0 1 $illcodes =~ /a/ ? :
1013 1 0 $illcodes =~ /b/ ? :
1014 0 1 $illcodes =~ /c/ ? :
1015 0 1 $illcodes =~ /d/ ? :
1016 0 1 $illcodes =~ /e/ ? :
1017 0 1 $illcodes =~ /f/ ? :
1018 0 1 $illcodes =~ /g/ ? :
1019 0 1 $illcodes =~ /h/ ? :
1020 0 1 $illcodes =~ /i/ ? :
1021 0 1 $illcodes =~ /j/ ? :
1022 0 1 $illcodes =~ /k/ ? :
1023 0 1 $illcodes =~ /l/ ? :
1024 0 1 $illcodes =~ /m/ ? :
1025 0 1 $illcodes =~ /o/ ? :
1026 0 1 $illcodes =~ /p/ ? :
1033 0 1 if ($hasill) { }
1 0 elsif (not $record_is_RDA and $subfieldb =~ /ill\./) { }
0 0 elsif ($record_is_RDA) { }
1034 0 0 if (not $record_is_RDA) { }
1035 0 0 unless $subfieldb =~ /ill\./
1038 0 0 if ($subfieldb =~ /ill\./) { }
1042 0 0 unless $subfieldb =~ /illustration/
1049 0 0 if ($subfieldb =~ /illustration/) { }
0 0 elsif ($subfieldb =~ /ill\./) { }
1058 1 0 unless $subfieldb =~ /map[ \,s]/
1 0 if ($hasmap) { }
0 0 elsif ($subfieldb =~ /map/) { }
1063 0 1 if ($hasport) { }
0 1 elsif (not $record_is_RDA and $subfieldb =~ /port\.|ports\./) { }
0 1 elsif ($record_is_RDA) { }
1064 0 0 if (not $record_is_RDA) { }
1065 0 0 unless $subfieldb =~ /port\.|ports\.|ill\./
1068 0 0 if ($subfieldb =~ /port\.|ports\./) { }
1072 0 0 unless $subfieldb =~ /portrait/
1079 0 0 if ($subfieldb =~ /portrait/) { }
0 0 elsif ($subfieldb =~ /port\.|ports\./) { }
1088 0 0 unless $subfieldb =~ /chart|ill\.|illustration/
0 1 if ($hascharts)
1093 0 0 unless $subfieldb =~ /plan|ill\.|illustration/
0 1 if ($hasplans)
1099 0 0 unless $subfieldb =~ /music|ill\.|illustration/
0 1 if ($hasmusic) { }
0 1 elsif ($subfieldb =~ /music/) { }
1104 0 0 unless $subfieldb =~ /facsim\.|facsims\.|facimile|ill\.|illustration/
0 1 if ($hasfacsim)
1108 0 0 unless $subfieldb =~ /coats of arms|ill\.|illustration/
0 1 if ($hascoats)
1112 0 0 unless $subfieldb =~ /geneal\. table|genealogical table|ill\.|illustration/
0 1 if ($hasgeneal)
1116 0 0 unless $subfieldb =~ /form[ s]|ill\.|illustration/
0 1 if ($hasforms)
1120 0 0 unless $subfieldb =~ /samples|ill\.|illustration/
0 1 if ($hassamples)
1130 0 1 if ($hasphono)
1135 0 0 unless $subfieldb =~ /photo\.|photos\.|photograph|ill\.|illustration/
0 1 if ($hassamples)
1142 0 1 if ($hasillumin)
1173 0 1 if $record->field(@series_fields)
1176 1 0 if ($record->field(490) and $record->field(490)->indicator(1) eq '1')
1177 1 0 unless $has_series_field
1211 1 0 if ($record->field(240) and not $record->field('1..')) { }
0 0 elsif ($record->field(240) and $record->field(240)->indicator(1) eq '0' and $record->field('1..')) { }
1250 1 0 if ($record->field(245)->indicator(1) eq '1') { }
0 0 elsif ($record->field(245)->indicator(1) eq '0') { }
1251 1 0 unless $record->field('1..')
1256 0 0 if $record->field('1..')
1336 0 0 unless $record->field('260', '264')
0 1 if ($encodelvl eq '8')
1338 1 0 if $record->field('008')
1339 0 1 unless $field008
1347 0 1 unless ($date1 and $date1 =~ /^\d{4}$/)
1351 1 0 if $record->field('050') and $record->field('050')->subfield('b')
1354 0 1 unless (@fields050)
1362 1 0 if ($field050->subfield('b'))
1367 1 0 if $subb050 =~ /\d{4}/
1374 0 0 $dates050[0] == $dates050[-1] ? :
1376 0 0 if @warningstoreturn
1382 1 0 if ($#dates050 == 0 and not join("\t", @warningstoreturn) =~ /Dates do not match in each of the 050s/)
1385 1 0 if ($dates050[0] =~ /^\d{4}$/) { }
1392 1 0 if (not $record_is_RDA) { }
0 0 elsif ($record_is_RDA and ($record->field('260') and $record->field('260')->subfield('c'))) { }
1394 1 0 if $record->field('260') and $record->field('260')->subfield('c')
1395 0 1 unless ($field260)
1408 1 0 if ($code eq 'c')
1416 1 0 if (not $wantedsubc =~ /\[i\..?e\..*(\d{4}).*?\]/) { }
1422 1 0 if ($wantedsubc =~ /^\d{4}$/) { }
0 0 elsif ($wantedsubc =~ /^\d{8}$/) { }
1430 0 0 if $record->field('260') and $record->field('260')->subfield('c')
1431 0 0 unless ($field260)
1444 0 0 if ($code eq 'c')
1452 0 0 if (not $wantedsubc =~ /\[i\..?e\..*(\d{4}).*?\]/) { }
1458 0 0 if ($wantedsubc =~ /^\d{4}$/) { }
0 0 elsif ($wantedsubc =~ /^\d{8}$/) { }
1466 0 0 if $record->field('264')
1470 0 0 if ($ind2 =~ /1/)
1471 0 0 if ($record->field('264')->subfield('c'))
1475 0 0 if $field264_with_c
1477 0 0 unless ($field264_with_c)
1489 0 0 if ($code eq 'c')
1497 0 0 if (not $wantedsubc =~ /\[i\..?e\..*(\d{4}).*?\]/) { }
1503 0 0 if ($wantedsubc =~ /^\d{4}$/) { }
0 0 elsif ($wantedsubc =~ /^\d{8}$/) { }
1524 0 1 if ($record->field(111) or $record->field(110) and $record->field(110)->subfield('d'))
1527 1 0 if (not $isconfpub == 1) { }
1528 1 0 unless ($date1 eq $date050 and $date050 eq $date260)
1535 0 0 unless ($date1 eq $date260)
1594 0 1 unless ($mattype =~ /^[ae]$/)
1596 1 0 if $record->field('008')
1597 0 1 unless $field008
1602 0 1 unless $bkindex =~ /[01]/
1633 0 1 if (grep {$_ =~ /^Includes index(es)?\.$/;} @fields504)
1638 1 0 if ($bkindex eq '0' and $hasindexin500or504) { }
0 0 elsif ($bkindex eq '1' and not $hasindexin500or504) { }
1650 0 1 if ($mattype eq 'e')
1661 0 1 if $bkcontents =~ /b/
1675 0 1 if ($bibrefin500)
1680 0 1 if ($hasbibrefs == 1 and not $bibrefin504 || $bibrefin500 || $isbibliography) { }
1 0 elsif ($hasbibrefs == 0 and $bibrefin504 || $bibrefin500) { }
1690 2 0 if ($bibref =~ /[\(\)]/)
1691 1 1 if $bibref =~ /\(.+?\)[^ \,\.]/ or $bibref =~ /[^ ]\(.+?\)/
1694 2 0 if (not $record_is_RDA) { }
1696 1 1 if ($bibref =~ /bibliographical references \((?!p\. ).*?\)?/)
1697 1 0 unless ($bibref =~ /bibliographical references \(t\.p\. .*?\)?/)
1704 0 0 if ($bibref =~ /bibliographical references \((?!pages? ).*?\)?/)
1705 0 0 unless ($bibref =~ /bibliographical references \(title page .*?\)?/)
1733 1 0 if $record->field('008')
1734 0 1 unless $field008
1738 0 1 unless ($langcode008 =~ /^[\w ]{3}$/)
1744 1 0 if ($record->field('041'))
1745 1 0 if $record->field('041')->subfield('a')
1749 0 1 if (not $first041a) { }
1753 1 0 unless ($firstcode eq $langcode008)
1800 0 1 if ($encodelvl eq '8')
1814 0 16 if ($isCIP and $tag eq '500' and $field5xx->subfield('a') =~ /^(LCCN)|(ISBN)|(Preassigned)/) { }
1827 0 16 if $code =~ /^\d$/
1831 0 16 if (length $data < 10) { }
16 0 elsif (length $data >= 10) { }
1849 3 13 unless ($data =~ /(\)?[\!\?\.]\'?\"?$)/)
1850 2 1 if ($tag eq '505') { }
1859 0 16 if $data =~ /\s*;\s*\.$/
1862 2 14 if $data =~ /(\)?[\!\?]\.\'?\"?$)/
1909 1 17 if (my(@floating_hyphens) = $fielddata =~ /(.{0,10} \- .{0,10})/g)
1964 0 34 unless $tag =~ /^[0-9][0-9][0-9]$/
1966 3 31 if $tag <= 10
1974 7 24 if ($field_string =~ /(?:(?![^ ]--)...) ([\.\,\?])(?: |$)/)
1978 1 6 if scalar @surrounding_text > 1
1981 1 6 length $field_string > 80 ? :
2064 1 0 unless $mattype eq 'g'
2069 0 0 if ($record->field('007')) { }
2074 0 0 unless $field007string =~ /^v/
2085 0 0 if ($#fields007 > 0) { }
0 0 elsif ($#fields007 == -1) { }
2097 0 0 unless $field007bytes[0] eq 'v'
2103 0 0 if ($field007bytes[1] eq 'd') { }
0 0 elsif ($field007bytes[1] eq 'f') { }
2105 0 0 unless ($field007bytes[4] =~ /^[vsz]$/ and $field007bytes[5] eq 'a' and $field007bytes[6] eq 'i' and $field007bytes[7] eq 'z')
2118 0 0 unless ($field007bytes[4] eq 'b' and $field007bytes[5] eq 'a' and $field007bytes[6] eq 'h' and $field007bytes[7] eq 'o')
2128 0 0 if $record->field('300')
2131 0 0 if (not $field300) { }
0 0 elsif ($field300->subfield('a') and $field300->subfield('b') and $field300->subfield('c')) { }
2144 0 0 unless $field300->subfield('a')
2145 0 0 unless $field300->subfield('b')
2146 0 0 unless $field300->subfield('c')
2151 0 0 if ($subfield300a)
2152 0 0 if ($subfield300a =~ /videodisc/) { }
0 0 elsif ($subfield300a =~ /videocassette/) { }
2165 0 0 if ($subfield300b)
2166 0 0 if (not $record_is_RDA) { }
2168 0 0 if ($subfield300b =~ /b.?\&.?w/ and $subfield300b =~ /col\./) { }
0 0 elsif ($subfield300b =~ /b.?\&.?w/ and $subfield300b =~ /col[^.]/) { }
0 0 elsif ($subfield300b =~ /b.?\&.?w/ and not $subfield300b =~ /col\./) { }
0 0 elsif ($subfield300b =~ /col\./ and not $subfield300b =~ /b.?\&.?w/) { }
0 0 elsif ($subfield300b =~ /col[^.]/ and not $subfield300b =~ /b.?\&.?w/) { }
2192 0 0 if ($subfield300b =~ /black \& white/ and $subfield300b =~ /colou?r/) { }
0 0 elsif ($subfield300b =~ /b.?\&.?w/ and $subfield300b =~ /col\./) { }
0 0 elsif ($subfield300b =~ /black \& white/ and not $subfield300b =~ /colou?r/) { }
0 0 elsif ($subfield300b =~ /b.?\&.?w/ and not $subfield300b =~ /col/) { }
0 0 elsif ($subfield300b =~ /colou?r/ and not $subfield300b =~ /black \& white/) { }
0 0 elsif ($subfield300b =~ /col\./ and not $subfield300b =~ /(b.?\&.?w)|(black \& white)/) { }
2222 0 0 if ($subfield300c)
2223 0 0 if ($subfield300c =~ m[4 3/4 in\.]) { }
0 0 elsif ($subfield300c =~ m[1/2 in\.]) { }
2250 0 0 if ($viddiscin300) { }
0 0 elsif ($vidcassettein300) { }
2251 0 0 unless $dim300 eq '4.75'
2254 0 0 unless $dim300 eq '.5'
2263 0 0 if $record->field('538')
2265 0 0 if (not @fields538) { }
2270 0 0 if ($field538 =~ /(DVD)|(Video CD)|(Blu-ray)/) { }
0 0 elsif ($field538 =~ /VHS ([hH]i-[fF]i)?( mono\.)? ?format, [ES]?L?P playback mode/) { }
2291 0 0 if ($vhs538 || $dvd538 and $notdvd_or_vhs_in538 == 1) { }
0 0 elsif ($notdvd_or_vhs_in538 == 1) { }
2306 0 0 if ($iscassette007) { }
0 0 elsif ($isdisc007) { }
2307 0 0 unless $vidcassettein300
2308 0 0 unless $vhs538
2312 0 0 unless $viddiscin300
2313 0 0 unless $dvd538
2319 0 0 if ($field007bytes[3] eq 'b') { }
0 0 elsif ($field007bytes[3] eq 'c') { }
0 0 elsif ($field007bytes[3] eq 'm') { }
0 0 elsif ($field007bytes[3] eq 'a') { }
2320 0 0 unless $bw_only
2323 0 0 unless $col_only
2326 0 0 unless $col_and_bw
2469 1 56 unless ($ldrbytes{'05valid'}{$status})
2473 10 47 unless ($ldrbytes{'06valid'}{$mattype})
2477 1 56 unless ($ldrbytes{'07valid'}{$biblvl})
2481 1 56 unless ($ldrbytes{'17valid'}{$encodelvl})
2485 3 54 unless ($ldrbytes{'18valid'}{$catrules})
2489 0 57 if ($record_is_RDA)
2490 0 0 if $catrules eq 'a'
2526 0 1 if (not $record->field('6..')) { }
2530 0 1 if $record->field('043')
2537 0 1 if ($field6xx->tag eq '651') { }
0 1 elsif ($field6xx->subfield('z')) { }
2550 0 0 unless ($geog043exceptions{$subfieldz})
2556 0 1 if ($hasgeog)
2557 0 0 unless $field043
2594 0 34 unless $tag =~ /^[0-9][0-9][0-9]$/
2596 2 32 if $tag < 10
2598 0 32 if ($encodelvl eq '8' and $tag eq '037')
2603 32 0 if $field->subfields
2608 0 40 if ($data eq '') { }
2618 1 39 unless $data
2647 0 1 unless ($record->field('040'))
2722 0 6 if $tag < 10
2731 0 6 if $code =~ /^\d$/ or $tag eq '240' and $code =~ /o/
2738 1 5 if (length $data < 10) { }
5 0 elsif (length $data >= 10) { }
2751 4 2 if ($data =~ /[.]\'?\"?$/)
2755 1 3 unless ($abbexceptions{$lastwords[-1]} or $lastwords[-1] =~ /(?:(?:\b|\W)[a-zA-Z]\.)$/)
2800 0 0 if (length $field->as_string > 1870)
2885 0 52 if (length $field006 != 18)
2888 0 52 if @warningstoreturn
2902 0 52 if ($biblvl =~ /^[s]$/) { }
11 41 elsif ($mattype =~ /^[at]$/) { }
8 33 elsif ($mattype =~ /^[m]$/) { }
11 22 elsif ($mattype =~ /^[ef]$/) { }
10 12 elsif ($mattype =~ /^[cdij]$/) { }
9 3 elsif ($mattype =~ /^[gkor]$/) { }
3 0 elsif ($mattype =~ /^[p]$/) { }
2904 0 0 if (@warnings_returned)
2914 11 0 if (@warnings_returned)
2924 8 0 if (@warnings_returned)
2934 11 0 if (@warnings_returned)
2944 10 0 if (@warnings_returned)
2954 9 0 if (@warnings_returned)
2964 3 0 if (@warnings_returned)
3025 0 70 if (length $field008 < 6)
3035 69 1 if ($dateentered =~ /^[0-9]+$/) { }
3041 68 1 if ($yearentered <= 70) { }
1 0 elsif (71 <= $yearentered and $yearentered <= 99) { }
3046 1 68 if ($yearentered > $current_year) { }
1 67 elsif ($yearentered < 1980) { }
3057 2 67 if ($monthentered < 1 or $monthentered > 12)
3062 1 68 if ($monthentered =~ /^01$|^03$|^05$|^07$|^08$|^10$|^12$/ and $dayentered < 1 || $dayentered > 31) { }
0 68 elsif ($monthentered =~ /^04$|^06$|^09$|^11$/ and $dayentered < 1 || $dayentered > 30) { }
0 68 elsif ($monthentered =~ /^02$/ and $dayentered < 1 || $dayentered > 29) { }
1 67 elsif ($dayentered < 1 or $dayentered > 31) { }
3070 1 68 if ($full_date_entered > $current_date)
3199 2 70 if (length $field008 != 40)
3202 2 70 if @warningstoreturn
3231 5 65 unless ($field008hash{'dateentered'} =~ /^\d{6}$/ and not $dateerrors =~ /entered/)
3237 1 69 unless ($field008hash{'datetype'} =~ /^[bcdeikmnpqrstu|]$/)
3263 2 0 unless ($field008hash{'date1'} =~ /^[u\d|]{4}$/ or $field008hash{'date1'} =~ /^\s{4}$/ and $field008hash{'datetype'} =~ /^b$/)
3269 65 5 if ($field008hash{'datetype'} =~ /^[bqs]$/) { }
4 1 elsif (not $field008hash{'date2'} =~ /^[u\d|]{4}$/) { }
3271 2 63 unless ($field008hash{'date2'} =~ /^\s{4}$/)
3285 68 2 if $MARC::Errorchecks::CountryCodes{$field008hash{'pubctry'}}
3287 0 70 if $MARC::Errorchecks::ObsoleteCountryCodes{$field008hash{'pubctry'}}
3289 2 68 unless ($validctrycode)
3291 0 2 if ($obsoletectrycode) { }
3306 68 2 if exists $MARC::Errorchecks::LanguageCodes{$field008hash{'langcode'}}
3308 0 70 if exists $MARC::Errorchecks::ObsoleteLanguageCodes{$field008hash{'langcode'}}
3311 2 68 unless ($validlang)
3313 0 2 if ($obsoletelang) { }
3322 1 69 if ($field008hash{'langcode'} eq ' ')
3329 1 69 unless ($field008hash{'modrec'} =~ /^[dorsx|\s]$/)
3335 2 68 unless ($field008hash{'catsource'} =~ /^[cdu|\s]$/)
3349 0 70 if ($biblvl =~ /^[s]$/) { }
29 41 elsif ($mattype =~ /^[at]$/) { }
8 33 elsif ($mattype =~ /^[m]$/) { }
11 22 elsif ($mattype =~ /^[ef]$/) { }
10 12 elsif ($mattype =~ /^[cdij]$/) { }
9 3 elsif ($mattype =~ /^[gkor]$/) { }
3 0 elsif ($mattype =~ /^[p]$/) { }
3351 0 0 if (@warnings_returned)
3361 12 17 if (@warnings_returned)
3371 8 0 if (@warnings_returned)
3381 11 0 if (@warnings_returned)
3391 10 0 if (@warnings_returned)
3401 9 0 if (@warnings_returned)
3411 3 0 if (@warnings_returned)
3449 0 0 if ($biblvl =~ /^[s]$/)
3453 0 0 unless ($bytehash{'frequency'} =~ /^[abcdefghijkmqstuwz|\s]$/)
3459 0 0 unless ($bytehash{'regularity'} =~ /^[nrux|]$/)
3465 0 0 unless ($bytehash{'contresundef20'} =~ /^[|\s]$/)
3471 0 0 unless ($bytehash{'typeofcontres'} =~ /^[dlmnpw|\s]$/)
3477 0 0 unless ($bytehash{'formoforig'} =~ /^[abcdefoqs\s]$/)
3483 0 0 unless ($bytehash{'formofitem'} =~ /^[abcdfoqrs|\s]$/)
3489 0 0 unless ($bytehash{'natureofwk'} =~ /^[abcdefghiklmnopqrstuvwyz56|\s]$/)
3495 0 0 unless ($bytehash{'contrescontents'} =~ /^[abcdefghiklmnopqrstuvwyz56|\s]{3}$/)
3501 0 0 unless ($bytehash{'govtpub'} =~ /^[acfilmosuz|\s]$/)
3507 0 0 unless ($bytehash{'confpub'} =~ /^[01|]$/)
3513 0 0 unless ($bytehash{'contresundef30to32'} =~ /^[|\s]{3}$/)
3519 0 0 unless ($bytehash{'origalphabet'} =~ /^[abcdefghijkluz|\s]$/)
3525 0 0 unless ($bytehash{'entryconvention'} =~ /^[012|]$/)
3561 40 0 if ($mattype =~ /^[at]$/)
3565 2 38 unless ($bytehash{'illustrations'} =~ /^[abcdefghijklmop|\s]{4}$/)
3571 2 38 unless ($bytehash{'audience'} =~ /^[abcdefgj|\s]$/)
3577 2 38 unless ($bytehash{'formofitem'} =~ /^[abcdfoqrs|\s]$/)
3583 2 38 unless ($bytehash{'bkcontents'} =~ /^[abcdefgijklmnopqrstuvwyz256|\s]{4}$/)
3589 2 38 unless ($bytehash{'govtpub'} =~ /^[acfilmosuz|\s]$/)
3595 3 37 unless ($bytehash{'confpub'} =~ /^[01|]$/)
3601 2 38 unless ($bytehash{'fest'} =~ /^[01|]$/)
3607 2 38 unless ($bytehash{'bkindex'} =~ /^[01|]$/)
3613 2 38 unless ($bytehash{'obsoletebyte32'} =~ /^[|\s]$/)
3619 2 38 unless ($bytehash{'fict'} =~ /^[01defhijmpsu|\s]$/)
3620 0 2 if ($bytehash{'fict'} eq 'c') { }
3630 2 38 unless ($bytehash{'biog'} =~ /^[abcd|\s]$/)
3666 16 0 if ($mattype =~ /^[m]$/)
3670 2 14 unless ($bytehash{'electresundef18to21'} =~ /^[|\s]{4}$/)
3676 2 14 unless ($bytehash{'audience'} =~ /^[abcdefgj|\s]$/)
3682 2 14 unless ($bytehash{'formofitem'} =~ /^[oq|\s]$/)
3688 2 14 unless ($bytehash{'electresundef24to25'} =~ /^[|\s]{2}$/)
3694 2 14 unless ($bytehash{'typeoffile'} =~ /^[abcdefghijmuz|]$/)
3700 2 14 unless ($bytehash{'electresundef27'} =~ /^[|\s]$/)
3706 2 14 unless ($bytehash{'govtpub'} =~ /^[acfilmosuz|\s]$/)
3712 2 14 unless ($bytehash{'electresundef29to34'} =~ /^[|\s]{6}$/)
3748 22 0 if ($mattype =~ /^[ef]$/)
3752 2 20 unless ($bytehash{'relief'} =~ /^[abcdefgijkmz|\s]{4}$/)
3758 2 20 unless ($bytehash{'projection'} =~ /^\|\||\s\s|aa|ab|ac|ad|ae|af|ag|am|an|ap|au|az|ba|bb|bc|bd|be|bf|bg|bh|bi|bj|bk|bl|bo|br|bs|bu|bz|ca|cb|cc|ce|cp|cu|cz|da|db|dc|dd|de|df|dg|dh|dl|zz$/)
3764 2 20 unless ($bytehash{'mapundef24'} =~ /^[|\s]$/)
3770 2 20 unless ($bytehash{'typeofmap'} =~ /^[abcdefguz|]$/)
3776 2 20 unless ($bytehash{'mapundef26to27'} =~ /^[|\s]{2}$/)
3782 2 20 unless ($bytehash{'govtpub'} =~ /^[acfilmosuz|\s]$/)
3788 2 20 unless ($bytehash{'formofitem'} =~ /^[abcdfoqrs|\s]$/)
3794 2 20 unless ($bytehash{'mapundef30'} =~ /^[|\s]$/)
3800 2 20 unless ($bytehash{'mapindex'} =~ /^[01|]$/)
3806 2 20 unless ($bytehash{'mapundef32'} =~ /^[|\s]$/)
3812 2 20 unless ($bytehash{'specialfmtchar'} =~ /^[ejklnoprz|\s]{2}$/)
3849 20 0 if ($mattype =~ /^[cdij]$/)
3853 2 18 unless ($bytehash{'formofcomp'} =~ /^\|\||an|bd|bg|bl|bt|ca|cb|cc|cg|ch|cl|cn|co|cp|cr|cs|ct|cy|cz|df|dv|fg|fl|fm|ft|gm|hy|jz|mc|md|mi|mo|mp|mr|ms|mu|mz|nc|nn|op|or|ov|pg|pm|po|pp|pr|ps|pt|pv|rc|rd|rg|ri|rp|rq|sd|sg|sn|sp|st|su|sy|tc|tl|ts|uu|vi|vr|wz|za|zz$/)
3859 2 18 unless ($bytehash{'fmtofmusic'} =~ /^[abcdeghijklmnuz|]$/)
3865 2 18 unless ($bytehash{'musicparts'} =~ /^[defnu|\s]$/)
3871 2 18 unless ($bytehash{'audience'} =~ /^[abcdefgj|\s]$/)
3877 2 18 unless ($bytehash{'formofitem'} =~ /^[abcdfoqrs|\s]$/)
3883 2 18 unless ($bytehash{'accompmat'} =~ /^[abcdefghikrsz|\s]{6}$/)
3889 2 18 unless ($bytehash{'textforsdrec'} =~ /^[abcdefghijklmnoprstz|\s]{2}$/)
3895 2 18 unless ($bytehash{'musicundef32'} =~ /^[|\s]$/)
3901 2 18 unless ($bytehash{'transposeandarr'} =~ /^[abcnu|\s]$/)
3907 2 18 unless ($bytehash{'musicundef34'} =~ /^[|\s]$/)
3943 18 0 if ($mattype =~ /^[gkor]$/)
3947 2 16 unless ($bytehash{'runningtime'} =~ /^([|\d]{3}|\-{3}|n{3})$/)
3953 2 16 unless ($bytehash{'visualmatundef21'} =~ /^[|\s]$/)
3959 2 16 unless ($bytehash{'audience'} =~ /^[abcdefgj|\s]$/)
3965 2 16 unless ($bytehash{'visualmatundef23to27'} =~ /^[|\s]{5}$/)
3971 2 16 unless ($bytehash{'govtpub'} =~ /^[acfilmosuz|\s]$/)
3977 2 16 unless ($bytehash{'formofitem'} =~ /^[abcdfoqrs|\s]$/)
3983 2 16 unless ($bytehash{'visualmatundef30to32'} =~ /^[|\s]{3}$/)
3989 2 16 unless ($bytehash{'typevisualmaterial'} =~ /^[abcdfgiklmnopqrstvwz|]$/)
3995 2 16 unless ($bytehash{'technique'} =~ /^[aclnuz|]$/)
4030 6 0 if ($mattype =~ /^[p]$/)
4034 2 4 unless ($bytehash{'mixedundef18to22'} =~ /^[|\s]{5}$/)
4040 2 4 unless ($bytehash{'formofitem'} =~ /^[abcdfoqrs|\s]$/)
4046 2 4 unless ($bytehash{'mixedundef24to34'} =~ /^[|\s]{11}$/)