Text Box Validation Using a Trigger [message #624] |
Mon, 25 February 2002 02:36 |
Greg Horton
Messages: 37 Registered: February 2002
|
Member |
|
|
The trigger below is what i have coded myself. I have a text box on a canvas that requires the user to enter a numerical value (real or integer) between 0 and say, 1000. If the data entered is not in this range or is not numeric, i would like to raise an exception message that i can customise.
Can you suggest a way that i can implement these requirements using a trigger? Perhaps i need only improve the trigger that i have already, although im not too sure..
DECLARE
v_occurances NUMBER;
BEGIN
v_occurances := :mine_data.support_value_text;
IF v_occurances NOT BETWEEN 0 AND 1000 THEN
Message('Support values must be between 1 and 1000.');
RAISE Form_Trigger_Failure;
END IF;
END;
Thanks,
Greg
|
|
|
|
|
|