Skip to Main Content
Feature Request FR-222
Product Area Application Builder
Status ROADMAP

128 Voters

Client-side Page Validations

jk Public
· Oct 25 2012

Validations are only run after a page is submitted. It would be nice to have validations run on client-side.

This would mean that a page refresh is not required to tell the user that a problem has occurred.

This is currently on the roadmap for a future release of Oracle APEX.

Comments

Comments

  • bart.peeters-1 OP 10.6 years ago

    Great idea! In the first place for mobile applications but more-and-more also for desktop applications.

  • pbelanger OP 10 years ago

    Very good idea! Having a way to make some server validations without submitting the page.

  • fac586 OP 9.5 years ago

    Validations must be run on page submission anyway. There's little point in running them twice.

  • dkurashkin OP 7 years ago

    Some of validation types doesn't need to send any request to the server (for example, check that number is between 1 and 100, value is not null, etc.).

  • senthilm OP 2.5 years ago

    Good Initiation, Would add more Points,  after AJAX Validation, the Validation result has to be stored an Item and based on it have to run the Dynamic Actions.

  • john.snyders APEX Team OP 2.5 years ago

    fac586 is correct ajax validations are extra (almost always) unneeded network traffic. Client side validations are something that we have been adding more of (number field item for example) and hopefully will continue.

  • scott wesley OP 2.4 years ago

    To say they're unneeded is a little utilitarian. While server side validation is a must for data integrity; (optional) client side validation can be integral for user friendliness, particularly when transitioning users from a Forms environment where instant feedback may have been the norm.

  • fahdbahoo OP 2.4 years ago

    Dynamic Client side validation is very basic requirement it should have been there when AJAX was introduced in APEX. Don't worry about network traffic, leave that decision to the developer.

  • jon.trostheim OP 2.4 years ago

    Yes client side validations is very much needed. It now in year 2021 it should have been part of the built-in feature of APEX to give users friendliness.

  • srihari.ravva APEX Team OP 2.3 years ago

    I like the idea. However, APEX should provide option to developers to choose which validations to fire on using AJAX calls. This gives flexibility to developers to balance between UX and performance. Also, some validations may not work using AJAX e.g. validations for uploaded files using file browse item, items created using APEX_ITEM APIs etc.

  • jk OP 2.3 years ago

    Nothing like suddenly getting a notification from a 9 year old post (first one I've ever had). :)

    RE the concern of additional network traffic, this is surely the case with most things? It's up to the developer to decide on the trade off. Most online forms these days validate without a submit, either as a single call when submit is pressed, or when leaving the field. Having the full page have to be generated, resent and rendered is also overhead on the server & client.

  • yuyu hop OP 1.9 years ago

    jj

  • j.sieben OP 1.3 years ago

    It could be as simple as adding a check box »execute dynamically« or similar at the validation. Then, the developer can make a decision. If you add a component setting to allow this option to be defaulted to yes or no, it would be even more developer friendly.

  • jorge.cribb OP 2 weeks ago

    Sometimes it is necessary to perform validations between dates or numerical formats, or things of this nature, and it is not appropriate to perform them on the server due to the level of interactivity required. For example: You have 3 dates and the 1st must be before the 2nd (if provided), the 3rd date must be after the 1st or the 2nd if provided, and all dates must be earlier than today or on the same day. All of this cannot be done correctly on the server due to the interactivity required. This includes sending warning messages if validation fails. Additionally, all this validation logic should be executed on the server without having to be programmed again in PLSQL. I think the best approach would be that we can program the validation in PLSQL and indicate that it should also be validated on the client. In that case, APEX should translate the PLSQL to JavaScript for the validation to be executed on the client as well.

  • dirk_strack OP 2 weeks ago

    @jorge.cribb i solved a similar range check problem with PL/SQL validations.

    on page load i loaded the ids and range values into an apex collection.

    Then i created validations for the lower and upper range columns.

    inside of the validation i tested the given value against the content of the collection for overlaps.

    Only when the test passes i updated the collection with the given value, otherwise i returned an error an left the collection unchanged. It was nessesary to disable the standard 'save' processing with a submit of the page, in order to get the PL/SQL validation executed.

    see https://forums.oracle.com/ords/apexds/post/interactive-grid-validation-challenge-5707