Himmelin,
function fn(str)
{
return str.split(",").every( num => num.trim() && num == Number(num))
}
let str = "1,2,3,4, 5,6 ,7";
alert(fn(str)); //true
str = "1б2ю3,4,5,6,6";
alert(fn(str)); //false
str = "1,,2,4,5,,,,,6,7";
alert(fn(str)); //false
str = "1,2,3,4,5,yyy,6";
alert(fn(str)); //false