Showing form validation errors individually using AJAX |
I want to individually show form validation errors under each input fields. I got it to work but the problem is if the field is already valid the element which handles the form error is not hiding.
Here's my ajax code: Code: function patient_add(){ Code: <div class="col-md-6"> Here's the controller portion. Code: $error = array();
Add the removeClass before you call the aja to validate
function patient_add(){ // remove any previos error $('input[name="' + key + '"]').next().html(val).removeClass('has-error'); then do the ajax to validcate
On the package it said needs Windows 7 or better. So I installed Linux.
(07-26-2017, 07:35 AM)rtenny Wrote: Add the removeClass before you call the aja to validate i think it can't be done since the key and val are taken inside the ajax function |
Welcome Guest, Not a member yet? Register Sign In |