I wrote a post on how to add client side validation for Django Forms. In this post I’ll show you how to add custom client validation to Django Forms. I mean by custom validation is a validation that isn't available in django-parsley, like username availability, password strength, email duplication, etc.. let’s see how to add custom client side validation to Django Form.

@parsleyfyclassUserRegistrationForm(forms.ModelForm):classMeta:...parsley_extras={'password':{'remote':reverse_lazy('validate-password-parsley'),'remote-message':"Password is invalid"},'username':{'remote':reverse_lazy('validate_username_uniqueness'),'remote-message':"User with this username is already exists."},'email':{'remote':reverse_lazy('validate_email_uniqueness'),'remote-message':"User with this email is already exists."},}

In the code above we are adding client custom validation as remote to password, username, and email fields, Did you notice that remote key is holding a URL to Django View? let’s create a complete sample to get our head around it.