When you are writing custom Validation Rules, you will quickly run into a situation where you need additional input from the user in order to perform the Validation. The process to gather additional input from the user is simple.
In your custom Validation Rule, create public properties that will hold the information you need from the user. If your values should have defaults, assign those defaults to the variables that back the properties.
Once you have built the custom Validation Rule, with the new properties, you will see the properties, and their default values, in the dialog box to Add Validation Rule. The user can override these values while adding the Validation rule to the web test.