This Server Behavior will allow you to verify that a form field was filled out correctly. This behavior can be used hand-in-hand with client side code as an extra layer of protection against bad data. Let's take a look at how it's applied: Choose Server Side Validation from the Basic-UltraDev menu. That will bring up the following dialog box: The Error Page attribute is a required field of the error page to go to on the event of a validation failure. The error message is optional, and defaults to "There was an error in the data you entered". This error message is appended to the URL when an error occurs as a variable named error, so that the error can be displayed to the user. The Validation Type attribute is a drop down list containing one of the following types:
The Form Element field is the form element that you want to validate. You can apply this behavior as many times as you need -- once for each form element. The Required field allows you to validate ONLY on the field if data is entered. . .in other words, a field might not be required, but if a user enters information, you'll want it validated. Also, it will work either with a standard UltraDev insert or update behavior, or it will work on a page by itself. If there is an update or insert behavior on the page you can check the checkbox Insert or Update on Page and the behavior will insert the proper code. The behavior is VBScript and JScript only at this point. Tom Muck |