API--> rows.add()
API--> rows.add()

When I use this api function and the integrity of json is not correct It throws an error in "error.dt" event and breaks(destroys) the table completely.
Is that an api method to verify the json before doing rows.add() or a way of preventing table of breaking?
I'm using the following:
$.fn.dataTable.ext.errMode = 'none';
$('#'+this.datatable_id).on( 'error.dt', function ( e, settings, techNote, message ) {
console.log("error:"+message);
this.datatable.clear();
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @fabiofacir ,
Yep, as you say DataTables doesn't validate - it would make the library files too large - so it's assumed the data is valid when being passed in. Try looking at this SO thread, it may help,
Cheers,
Colin