jwaliszko / ExpressiveAnnotations

Annotation-based conditional validation library.
MIT License
351 stars 123 forks source link

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

Open natiki opened 6 years ago

natiki commented 6 years ago

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:

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 commented 6 years ago

Bump!

jwaliszko commented 6 years ago

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.

natiki commented 6 years ago

Thanks I will have a look.