Skip to content

Cannot validate anything #307

Description

@korakotlee

I use csvlint gem on a Rails app, no matter how I put in the data, it always valid

schema = Csvlint::Schema.new({
  fields: [
    {
      "name": "pid",
      "constraints": {
        "required": true,
        "pattern": "^LBP-\d{8}-\d{6}$"
      }
    }
  ]
})

csv = <<~CSV
  pid
  BPxxx
CSV

validator = Csvlint::Validator.new(StringIO.new(csv), schema: schema)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions