Is this Tic-Tac-Toe board valid?
JavaScript (ES6), 88 87 bytes

s=&gt;(a=[...s]).sort()[5]-a[3]&amp;[7,56,73,84,146,273,292,448].every(j=&gt;j&amp;i,i=`0b`+s^~-a[4])


Takes input as a string of 9 0 and 1 characters and returns 1 for valid, 0 for invalid. We sort the characters into order. If the middle three characters are now the same then the board is invalid as there are too many of one piece. Otherwise, we convert the original board into binary, flipping the bits if there are more 0s than 1s. At this point the board is valid if 0 does not have a line of three, so we simply test all eight lines via an array of bitmasks. Edit: Saved 1 byte thanks to @ETHproductions.