" show error if the entered field is not numeric"
--> your validation must be set to "Item is numeric"
Thank you -W for your reply, i set Validation ->Type = Item is numeric, but the error message doesnt appear.
When do you expect the error message?
After Submit, when SAVE button ist pressed?
Your Validaton has the condition
when Button pressed = 'SAVE'
From Context Help of the "Execute Validation" Property:
If the page is submitted and this attribute is set to Yes, all validations defined for the page and also the built-in validations are executed (such as required, valid number or valid date) on the server-side. In addition, if Compatibility Mode of the application is set to 5.1 or above, Application Express will also perform client-side validations, such as item required.
--> Page must be submitted for validations
If you don't submit you must validate in your DA for example using HTML5 constraint API
setCustomValidityfunction, have a look at John's article for details about this
Soukaina IDRISSI wrote:
Hi everybody ,
I have one field called P4_duration, with Type= Text Field, and i want to show error if the entered field is not numeric, so for that i created a validation for this field like this:
But when i enter alphanumeric field , nothing is happening.
How can i fixe that ?
Thank you for help.
What happens if you alter P4_DURATION from a Text Field to a Numeric Field instead of executing the validation?
no validation message at all is expected when you press the Save button. Validations are executed after the page submission while your Save button triggers a dynamic action. If you want to execute validation(s) on your Save button click, you need to change the Action from Defined by Dynamic Action to Submit Page. Then you need to move your PL/SQL code from these two true actions to one (or more) page processes (the set value action can be replaced in the PL/SQL code with a simple assignment:
:px_item_y := 'new_value';
You can see the processing order if you open the Processing tab in the page designer
so make sure your PL/SQL logic is executed in the Processing section, not After Submit (e.g. before validations).
I did your second proposition to move all traitements from DA to Submit Page, and it works.
Thank you so much for help -W