In customizing a data input form, the user can define controls and their type that will appear on the form. So the user may essentially say "I want a string variable named "A" and a string variable named "B" to appear on the form. The program will dynamically create the controls and add them to the form.

As part of a "form verification" the user may want to ensure that certain controls pass validation checks.
Since the controls are unknown to the program ahead of time (ie they are created and added to the form at runtime) the validation would be via a string variable specified by the user. For example, if the user defined string variables a, b, and c, the verification string might be "a = b or b = c". So if "a" equals "b" or "b" equals "c" then the form can be saved.
The problem is that I can't seem to find a way to execute the verification string at runtime. I tried the jscript eval function but I can't seem to pass it parameters. Right now the only way I can think of doing this is to create a string at runtime that contains the name of the variable and its value and then the verification string would be a regex expression that could be applied to the string. But that's an ugly solution and I'm hoping someone could suggest something more elegant.