There's a custom validator in the ValidationControls example on the CD-ROM, next to the fifth text box from the top. This example lets the users apply for college, and the custom validator checks the amount of tuition they're willing to pay. In this case, I've added this script, written in VBScript, to the ValidationControls example's WebForm1.aspx file:
To see more on how to write scripts in Web pages, see references such as the Coriolis HTML Black Book.
In this script, I've created a procedure named Validate, where I'm just checking to make sure that the value the user has entered is greater than 20,000. To connect that to the custom validator in the ValidationControls example, you set the validator's ClientValidationFunction property to Validate. Because the value the user has entered is less than 20,000 in Figure 18.9, the custom validator is displaying its error message.