Try this one.
/([A-Z0-9]{8},){0,49}([A-Z0-9]{8}){1}/g
This will look for (8 capital letters or numbers followed by a comma) for minimum 0 to maximum 49 times. Then it will look for (8 capital letters or numbers followed by a comma) one time.
In this way a user can enter a Single block NOT followed by comma or maximum 50 blocks seperated by commas with the last one NOT followed by a comma.
You will need to compare the lengths of the original input and the result from input. For Example:
let a = "1F223142,23FH2324,3232UD23";
let r = /([A-Z0-9]{8},){0,49}([A-Z0-9]{8}){1}/g.exec(a)[0].length;
if (a.length == r.length) {
//valid input
} else {
//invalid input
}