|
Validating User Input
|
|
You want ensure that only the values 0, 1, 2, 3, 4, or 5 to be entered into the PERS component fields. Therefore, you have to include some way of checking the participant's entries in these fields to make sure that they are valid. If the user enters an incorrect value in one of the component fields, two things must happen:
This presents a problem because nine different component fields could be accessing the PERS() function at any time. To make this work, you have to pass information to the function, indicating which field is using it. You do this with the "this" keyword. |
