I am attempting your method as well (exploring both solutions), but my page has a syntax error and loads blank. I am having trouble determining what is wrong. Could you look at my code and see what may be wrong. Attached is code.
Ultimately, I would like to get this to work both ways since I have multiple projects requiring similar checks and would like to understand both methods. I do not mind using Server Side Validation at all.