Closed MachariaK closed 1 year ago
Hi. There’s no support for such validation in the library. That type of complex validation could be done after parsing data.
On Sun, 19 Mar 2023 at 10:20, Tim Kariuki @.***> wrote:
I want to access other row values when validating data. Is this possible? See code below:
const schema = { 'KRA Pin': { prop: 'kraPin', required: true, type: (value, row) => { console.log(row) // HOW CAN I ACCESS nssfNUMBER HERE? } }, 'NSSF Number': { prop: 'nssfNumber', required: true, }, }
— Reply to this email directly, view it on GitHub https://github.com/catamphetamine/read-excel-file/issues/112, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUP3YEQHN5OCCFXYOI5QTW42XTBANCNFSM6AAAAAAV76GPFQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi, if we do the validation after parsing data, how to get the row number and column name in which the validation failed?
The errors list items have row and column indexes
On Wed, 28 Feb 2024 at 07:36, Deepak Singh @.***> wrote:
Hi, if we do the validation after parsing data, how to get the row number and column name in which the validation failed?
— Reply to this email directly, view it on GitHub https://github.com/catamphetamine/read-excel-file/issues/112#issuecomment-1968209873, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUP3YSGI6OLJIRHIKHNKLYV2X3TAVCNFSM6AAAAAAV76GPFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRYGIYDSOBXGM . You are receiving this because you commented.Message ID: @.***>
I want to access other row values when validating data. Is this possible? See code below:
const schema = { 'KRA Pin': { prop: 'kraPin', required: true, type: (value, row) => { console.log(row) // HOW CAN I ACCESS nssfNUMBER HERE? } }, 'NSSF Number': { prop: 'nssfNumber', required: true, }, }