def validate(record, field_name, bindings = {})
      if validations
        validations.collect do |validation|
          unless valid_value?(validation, record, field_name, bindings)
            FieldValidationError.new(validation, record, field_name, pos, width)
          end
        end.compact
      elsif record && record[field_name]
        # when no validation rules exist for the field, just check if the field exists in the record
        []
      else
        raise "found field value nil in #{record} field #{field_name}, shouldn't be possible?"
      end
    end
def validate(record, field_name, bindings = {})
      if validations
        validations.collect do |validation|
          unless valid_value?(validation, record, field_name, bindings)
            FieldValidationError.new(validation, record, field_name, pos, width)
          end
        end.compact
      elsif record && record[field_name]
        # when no validation rules exist for the field, just check if the field exists in the record
        []
      else
        raise "found field value nil in #{record} field #{field_name}, shouldn't be possible?"
      end
    end
return an array of error objects
 empty array if all validation passes