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.
Great idea! In the first place for mobile applications but more-and-more also for desktop applications.
Very good idea! Having a way to make some server validations without submitting the page.
Validations must be run on page submission anyway. There's little point in running them twice.
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.).
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.
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.
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.
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.
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.
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.
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.
jj
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.
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.
@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