SuperValidator - Validate user input using programmable regular expressions

The SuperValidator feature of ASP-db2000 is a unique feature you would not find in any other product. While most product uses local JavaScript code to "hard code" the validation mask, SuperValidator uses a regular expression engine to enable a programmable mask. If the browser type is IE  then the color of a valid, incomplete and invalid can be defined by the user to inform the user about the validity of their input values.

Setup Validator to validate an input field. This property when defined (not blank) will setup all the JavaSscript code for the validation in standard or template conditions. In order to use the validator, the "AspdbValidator.jar" file must be either located in the Jars directory or a path defined by the Codebase parameter of dbValidatorParams.

Step by Step Example Procedures

Property Syntax

dbValidatorParams = "(;,)CodeBase,ValidateOnEntry,ValidColor,ValidMsg,InvalidColor,InvalidMsg, IncompleteColor,IncompleteMsg"




Codebase Virtual location of the AspdbValidator.jar. This input is mandatory. 
ValidateOnEntry  Default=True. Validates the default values. Normally, validator only validate a field upon a cursor or key to the input box. But when this parameter is set to "True", then the default value in the input box is checked whether you visit the box with the cursor/key or not. This action is
very expensive and requires that the <Body Onload=IVInitStatuses()> is taken up by ASP-db. IN fact whne you click this box, this OnLoad will be appended to the <BODY ...> tag. However, using EditBodyTag (New keyword as BodyTag is for Grid & Form) in dbOptions will allow user body tags to be included. Without ValidateOnEntry, if the default values are invalid, then it 'll also be passed. As always, if cursor vist the box then content of the input box will already be validated. When validator is activated (dbValidatorParams<>"") then the EditValidateName of dbEditParams will have the value of "aspdbValidatorSubmit" and user will not be able to use this feature.
ValidColor Color of text when input value is valid - Blue
ValidMsg Message text when valid - OK
InvalidColor Color of text when input value is invalid - Red
InvalidMsg Message text when invalid - ERROR IN INPUT FIELD
IncompleteColor Color of text when input value is not complete but valid - Magenta
IncompleteMsg Message text when incomplete - INCOMPLETE FIELD


Set X= Server.CreateObject("ASP.DB")
X.dbUnit = "999"
X.dbMode = "Grid"
X.dbValidatorParams = "http://localhost/aspdb/Jars"
X.dbEditFlds = "(;,[]|~)Car,Manufacturer,Year[2001|2001|||1~ISNUMBER~3~2000~2005~~0~The year input should be #### ],Transmission,Price"
X.dbEditParams = "(;,)TableName=CarSpecs, BookMarkFlds=Car"
X.dbEditUpdateROFlds = "Car"
X.dbNavigationItem = "Top,Prev,Next,Bottom,GridRow,Reload,Edit,Update,Delete,Add"
X.dbSQL = "SELECT Car,Manufacturer,Year,Transmission,Price FROM CarSpecs"