ExpressiveAnnotations icon indicating copy to clipboard operation
ExpressiveAnnotations copied to clipboard

Approach to implementing an AJAX callback to check say for duplicate records....

Open natiki opened this issue 8 years ago • 3 comments

Hi,

One of the things we have a need to do quite often is check some form of "complex" validation client side that ultimately does not relate to only the view model being edited. Common examples might include:

  • Checking for duplicates (ie is login name taken)
  • Checking for association (ie is adding this record allowed based on a collection of other data)

So I was thinking of building a validator and in essence passing the necessary information to the client side which would then invoke a '.ajax' call back to the server which would ultimately do the heavy lifting.

Are there any issues with this approach or is there a better way? Or has someone already done something similair?

natiki avatar Feb 16 '18 10:02 natiki

Bump!

natiki avatar Mar 10 '18 03:03 natiki

It's probably too late, nevertheless please excuse the lack of earlier response. There was an ongoing discussion under the following thread long time ago. As a result of that the first approach to asynchronous validation was implemented in the async-work branch, which is mentioned in the documentation. Currently there are no plans for merging this code into the master because it is still in a non-production stage, and probably this is not going to change anytime soon.

jwaliszko avatar Apr 10 '18 21:04 jwaliszko

Thanks I will have a look.

natiki avatar Apr 15 '18 02:04 natiki