Server side validation mdb-select


Topic: Server side validation mdb-select

flexinform pro premium asked 7 months ago

Hello there,

i would like to set a mdb-select element to invalid and set the error message from the AJAX call response manually, but i didn't find solution or example for this.

Can you help me please?

Thx


Krzysztof Wilk staff answered 7 months ago

Hi!

I think that this snippet could be helpful https://mdbootstrap.com/snippets/jquery/mikolaj-smolenski/893718#js-tab-view. You can set an error message in .done function.

The other way is to use this plugin - https://jqueryvalidation.org/validate/ (there is an ajax handler in submitHandler() description). Also, you can check an article about validation: https://mdbootstrap.com/articles/jquery/validate-forms-with-validate-js/ :)

Best regards


Please insert min. 20 characters.