If it's "mission critical" that the data is valid then there's no real substitute for server-side validation. The idea being that you submit the form only for it to be displayed again, with your original values in place and any errors highlighted. You correct the errors and try again until everything is ok and the form saves. Personally, I prefer either this method alone or a combination of the two. There are a few forms where I've done this using PHP, but what about doing some server-side validation in Domino?
It's been a few months since I had this idea and made my first failed attempt. All this recent talk of errors has got me thinking about it again. What I wanted to do was a simple validation, using some @Functions, when the form is submitted. If it fails then the form is re-displayed with the submitted values and the errors listed. My idea was to do this in the WebQuerySave event. If it fails then set a SaveOptions field to "0" and the document won't save.
What I couldn't do was stop the document from saving when there were errors. Today or tomorrow I will try again and see how I get on. In the mean time I am open to suggestion. Any of you know a way to do this? Simply!