Re: Allow field validation in ajax.

2021-06-17 Thread Ayush Bisht
If you specifically trying to validate the form on the basis of empty input field, then simply include *required* attribute in you input field ** and for more validation , you just validate all the thing in HTML only using django template tags... here I am including a descent approach ...

Re: Allow field validation in ajax.

2021-06-17 Thread Eugene TUYIZERE
Dear NA, still it does not wark On Sun, 13 Jun 2021 at 03:20, Nikeet NA wrote: > You are not submitting your form which Inturn is not validating. For > validations to run you need to submit a form. > > Give the submit button attribute type="submit", then add an event listener > for form submit

Re: Allow field validation in ajax.

2021-06-12 Thread Nikeet NA
You are not submitting your form which Inturn is not validating. For validations to run you need to submit a form. Give the submit button attribute type="submit", then add an event listener for form submit in your javascript. $("#ReportForm").on('submit', function(event) { // here event i

Allow field validation in ajax.

2021-06-12 Thread Eugene TUYIZERE
Friends, The ajax codes below successfully save the records in the database without page loading. But what I want is to validate the fields first before saving. The codes do not validate the empty field. How can I include that validation ? please help $(".submit_btn").click(function(){ var form=