Validating BarCode Input


Ask A Question





Login To post a question
     "{
  slides: [
    {
      barcode: 'da5455555',
      status: null,
      wells: [
        {
          id: 1,
          name: 'A1',
          status: null,
          sampleType: 'Flower',
          client: 'HarjotPannu',
          files: [
            {
              name: 'ScanJob-180503123200_2_A1_2.tif',
              file: {
                preview: 'blob:http://localhost:3000/d0f43ff3-42f7-451f-8fcf-ae9f5e1c7c5e'
              },
              type: 'image/tiff',
              barcode: '180503123200',
              position: '2',
              spectrum: '2',
              status: 'pending'
            }
          ],
          failures: [],
          clientId: '0CG0bTCO0P21MAqRwlpu'
        }
      ],
      reports: {
        csv: null,
        csv2: null,
        gms: null
      }
    },
    {
      barcode: '665656566',
      status: null,
      wells: [
        {
          id: 1,
          name: 'A1',
          status: null,
          sampleType: 'Flower',
          client: 'HarjotPannu',
          files: [
            {
              name: 'ScanJob-180503123200_2_A1_3.tif',
              file: {
                preview: 'blob:http://localhost:3000/716dc4de-fb83-40a2-b891-59d2597e068c'
              },
              type: 'image/tiff',
              barcode: '180503123200',
              position: '2',
              spectrum: '3',
              status: 'pending'
            }
          ],
          failures: [],
          clientId: '0CG0bTCO0P21MAqRwlpu'
        }
      ],
      reports: {
        csv: null,
        csv2: null,
        gms: null
      }
    },
    {
      barcode: 'sfdsfsdfsdfsdf',
      status: null,
      wells: [],
      reports: {
        csv: null,
        csv2: null,
        gms: null
      }
    }
  ]
}


{
  slides: [
    {
      barcode: 'da5455555',
      status: null,
      wells: [
        {
          id: 1,
          name: 'A1',
          status: null,
          sampleType: 'Flower',
          client: 'HarjotPannu',
          files: [
            {
              name: 'ScanJob-180503123200_2_A1_2.tif',
              file: {
                preview: 'blob:http://localhost:3000/d0f43ff3-42f7-451f-8fcf-ae9f5e1c7c5e'
              },
              type: 'image/tiff',
              barcode: '180503123200',
              position: '2',
              spectrum: '2',
              status: 'pending'
            }
          ],
          failures: [],
          clientId: '0CG0bTCO0P21MAqRwlpu'
        }
      ],
      reports: {
        csv: null,
        csv2: null,
        gms: null
      }
    },
    {
      barcode: '665656566',
      status: null,
      wells: [
        {
          id: 1,
          name: 'A1',
          status: null,
          sampleType: 'Flower',
          client: 'HarjotPannu',
          files: [
            {
              name: 'ScanJob-180503123200_2_A1_3.tif',
              file: {
                preview: 'blob:http://localhost:3000/716dc4de-fb83-40a2-b891-59d2597e068c'
              },
              type: 'image/tiff',
              barcode: '180503123200',
              position: '2',
              spectrum: '3',
              status: 'pending'
            }
          ],
          failures: [],
          clientId: '0CG0bTCO0P21MAqRwlpu'
        }
      ],
      reports: {
        csv: null,
        csv2: null,
        gms: null
      }
    },
    {
      barcode: 'sfdsfsdfsdfsdf',
      status: null,
      wells: [],
      reports: {
        csv: null,
        csv2: null,
        gms: null
      }
    }
  ]
}"

As you can see that I have the same object with the Key:value of Barcode. I am able to open multiple instances of this component Before sumbmiting I need to validate the BarCode. Data is coming connected with Redux/React can someone please give me little push on how to target the same input in different indexes.

Thanks

For more info please click herehttps://stackoverflow.com/q/51863900



Have a question or need a custom quote?
info@smartinfocare.com