I think that would lead to beginners hanging their kings which would likely be a little bit problematic to code… it would also be awful for people playing bullet.
also, it surely makes more sense that the site is there doing the arbiter’s job? Like, in a tournament you’re not allowed to play illegal moves, this just skips a step….
Would make it more realistic no? Have an additional button claiming your opponent made an illegal move and you gain more time if they made an illegal move.