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!

Validation to Check for Item Length

cloakedSep 10 2008 — edited Sep 15 2008
Greetings,

I have a column that is defined with a length of 240 in the table, and I want to give a validation error if the user enters more than 240 into the corresponding item on the Apex page. I have this code in my validation routine and it is listed as PL/SQL:
TO_NUMBER(LENGTH(:P10_ACTIVITY_COMMENT)) < 241

When I save a record with a comment more than 240 the validation error appears, but an Oracle error also shows at the top of the page:
"Invalid PL/SQL expression condition: ORA-06502: PL/SQL: numeric or value error: character to number conversion error Invalid PL/SQL expression condition: ORA-06502: PL/SQL: numeric or value error: character to number conversion error"

I've changed the code in a few different ways, but they all give the Oracle error.

How should I code it?

Thanks, Tony
This post has been answered by 60437 on Sep 12 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2008
Added on Sep 10 2008
22 comments
4,907 views