Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Invalid dates - ORA error instead of validation message

AnnelizeFJun 21 2017 — edited Jun 21 2017

Good day

I'm using Application Express 5.0.0.00.31 in the Cloud on a Oracle 12.1 cloud database.

I have a form built on a table. This form has a date field, referencing a database column of type DATE, using the DatePicker for display. (see sample image attached).

The validation on the date field, making sure the user entered a valid date (as opposed to the word 'date' I filled in below) looks as follows:

Type: Item is a valid date

Item: Name of the date field

Error: #LABEL# must be a valid date.

Display Location: Inline:

Associated Item: Name of the date field

This is the first validation in the list. If this is the only validation in the list, then the message is triggered and it's working as expected:

Form.png

However, adding a second validation to make sure that start date is <= sysdate I, get the following message upon SAVE.

Type: PL/SQL expression

Expression: P10_PERSON_GPP_START_DATE <= sysdate

Item: Name of the date field

Error: #LABEL# must be on or before today

Display Location: Inline:

Associated Item: Name of the date field

Error processing validation.

ORA-01858: a non-numeric character was found where a numeric was expected

Form example.png

I would expect my validation checking for a valid date to catch this and no other validation to run afterwards.

So I ran the page in debug mode and the debug log shows that the validation was triggered. (I will include a post of the log in a reply to this message.)

The same thing is happening to all of my date fields across the application. These date fields are either DATE or TIMESTAMP(0)

Has anybody come across this before and found a workaround to use the validation to prevent users from typing non date values into a field?

Thanks in advance

Annelize

This post has been answered by fac586 on Jun 21 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2017
Added on Jun 21 2017
4 comments
1,653 views