I have array like the below
data = [
[product, billdetail],
[avn, 200],
[plioc,3000],
[myjio,4000]
]
for(var i = 1; i < data.length; i++) {
var cube = data[i];
for(var j = 0; j < cube.length; j++) {
console.log("cube[" + i + "][" + j + "] = " + cube[j]);
if(cube[j] === "")
{
alert('empty value');
}
}
}
I am doing empty validation here, i also want validation like product should have only alphabets and billdetail should have number only.so how can i achieve that here.please help me for the same. (consider first row is table header and other rows are values.)