Inside afterChange hook check every value match with my regex if value is not match with regecx then particular cell false with comment like Invalid value
//here is code
hot.addHook(‘afterChange’, function(changes, source) {
var regex = /^[a-zA-Z]{4}\d{7}$/;
column.forEach(function(value, row) {
var cell = instance.getCellMeta(row, 0);
if(value != null){
if (regex.test(value)) {
alert("Matched");
} else {
alert("Not matched");
cell.valid = false
cell.comment = 'Error: Container no invalid'
}
}
});
hot.render()
});
cell.valid = false with comment is not working