d-kostov-dev / ng2-mdf-validation-messages

Angular 2 Model Driven Forms Validation Messages
MIT License
11 stars 8 forks source link

Server Side Validation using this library (Ajax Validation) #13

Open SigmaSoftSol opened 5 years ago

SigmaSoftSol commented 5 years ago

Hello Team, Can I create a custom validator where it will perform validation on the server side by using a custom function and based on the execution result it will show case the error. For example if I want to check the uniqueness of a user from the database, I will call an api to find out. the api will return the true or false. If true then the library should not emit the error. If the output is false then it should display the error message. Is it possible in this library. If available can you please share me the code snippet for the same.

Thanks & Regards, Seshu Kumar.