IF you want to keep the cursor in the current item when the validation fails, use RAISE FORM_TRIGGER_FAILURE instead of GO_ITEM
AndreasW is correct. Also, you can never use navigational commands (like go_item, go_block, next_record, etc) in any When-Validate trigger. When you press the Enter or Tab key, or move focus with a mouse click, those actions cause When-Validate trigger to run, and focus will move to the next field IF the When-Validate trigger does not "Raise Form_Trigger_Failure;".
trigger: when_validate_item of ename
v_prohibited_chars VARCHAR2(100):= '!@#$%^&*';
v_result := TRANSLATE(EMP.Ename,'A'||v_prohibited_chars,'A');
IF LENGTH(:EMP.Ename) <> LENGTH(v_result) THEN
message('Special Charecter are not allowed');
this procedure works good.But It did not sent focus at itself(item) by using Go_ITEM built in.It flashes FRM:40735 error.Please tell me that how can I refocus current text item again in oracle forms.
Hi, Aaditya do the above correction, if emp.sal is the immediate next item of ename then your problem will be solved above correction is enough.