Skip to content

Instantly share code, notes, and snippets.

@kylefox
Created December 9, 2015 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylefox/fdb7a89f3b033cea59ca to your computer and use it in GitHub Desktop.
Save kylefox/fdb7a89f3b033cea59ca to your computer and use it in GitHub Desktop.
def validate(self, data):
if data['new_password1'] != data['new_password2']:
raise serializers.ValidationError({
'new_password2': 'Password confirmation does not match.'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment