your best bet is to always check the code on the server as well and give back a warning from there (and redisplay the form) if an error occurs.
You should never completely rely on clientside validation only, especially for public applications (for intranet use where you can control the exact client configuration you might be able to get away with it sometimes but even then I'd not rely on it).