0

I have done Django's form validation at the server-side. Is there any need for client-side validation? If I want to do client-side validation using JavaScript, without writing duplicate validation code at the client-side, can I get Django's server-side validation code at the client-side using JavaScript? So, I can avoid server round-trips and reload time.

  • In other words, are you asking if somehow the Django validation could be transferred to client-side validation? And have you taken a look at this: https://stackoverflow.com/questions/162159/javascript-client-side-vs-server-side-validation – Daniel Holmes Aug 01 '19 at 15:38
  • Yes. I am asking "if somehow the Django validation could be transferred to client-side validation"?. The link you gave is not satisfying my answer. Is it the best way to do form validation using Django-Parlsey. I want the detailed way how to use this library, to do somewhat complex validation using Django-Parley. How to validate : the field First name should contain minimum 12 characters and its first character should be in uppercase and remaining in lowercase and should allows only [a-z] and [A-Z] characters. – Pradnya Bamane Aug 01 '19 at 16:51
  • I see. I would suggest you edit your question to make it more specific based on your comment above. Furthermore, I would suggest you include code you have already tried. – Daniel Holmes Aug 02 '19 at 08:09

0 Answers0