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 execution order

Scott WesleyApr 15 2024

Hi,

I've been having trouble finding details on behaviour differences I'm seeing between 20.2 and 22.1.

Consider a simple form with 3 fields

  • field with ‘value required’ set
  • number field with minimum value = 10
  • field with some custom validation

In 20.2, if the mandatory field was missing, we got a popup. I see the release notes in 21.1 covers this and we now see more consistent messaging, as described.

If I submit the form in 20.2 with required field set, I see an error if the number is < 10, and if the custom validation doesn't comply.

If I submit the same form in 22.1, I see the required field message (great), the number message (great), but no custom validation until the native validations are compliant

Only one the native validations that appear to run on the client - no db communication required, do we see custom validations executed.

Initially I thought this may have been related to the compatibility mode changes for 21.2 / 22.1, but this did not affect these Validations. It only affected Processes, where the second process wouldn't execute if apex_error was called unless compatibility mode was 19.2

Mode 21.2, only message from first process shown

Mode 19.2, message in second process also shown (but inline message overwritten, not accumulated)

apex_error.add_error (
         p_message          => 'y? are you sure?'
        ,p_display_location => apex_error.c_inline_with_field_and_notif  
        ,p_page_item_name   => 'P22_CUSTOM'
       );

Do we have any control over the native validations needing to be resolved before the user sees results from custom validations?

Comments
Post Details
Added on Apr 15 2024
0 comments
253 views