Skip to content

Commit 6299ede

Browse files
committed
Added some comments for header validation description for tind spread validator
1 parent 026140a commit 6299ede

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/lib/tind_spread/tind_validation.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ module TindSpread
44
# rubocop:disable Metrics/ModuleLength
55
module TindValidation
66

7-
# validates the header rown
7+
# validates the header row
8+
# should be 3 digits for field, 2 for indicator (can be _, number), one digit or number for subfield
9+
# optionally can have a ('-' followed by a number). This is used to group columns into similar fields
10+
# the header row can also be just "Filename" or "FFT". The program will create the proper fields for those
811
def self.valid_header?(str)
912
str.match?(/\d{3}[_|\d]{2}[a-zA-Z0-9]$/) || str.match?(/\d{3}[_|\d]{2}[a-zA-Z0-9]-\d$/) || str.match?(/Filename|FFT/i)
1013
end

0 commit comments

Comments
 (0)