function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raghu Natha 2Raghu Natha 2 

LWC lightning data table on cell change data validation


I awant to validate the data in a editable data table cell change event


In JS file 
        console.log('Cell Data  : ' +JSON.stringify( event.detail.draftValues[0]));        

How to validate the above data and send an error message.
In the columns array i do have the column name type, lenght, so the validations that I am looking for is to check against the data type and length in the JS method.

Tahnk you

I guess this can help you to get it done.

#validation #javascript #lightning-datatable

More on displaying errors you can find here
search for Displaying Errors.
Himanshu Sharma 241Himanshu Sharma 241
This is a common issue i think you can visit InstaLyrics (