Report the bad field in the API error response.

master
Nick Sergeant 2013-02-11 10:44:10 -05:00
parent b9803755a1
commit f2b2b46aa4
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class UserProfileValidation(Validation):
for field in bundle.data:
if not re.match('^[ A-Za-z0-9\._-]*$', bundle.data[field]):
errors['invalid'] = 'Only spaces, letters, numbers, underscores, dashes, and periods are valid.'
errors[field] = 'Only spaces, letters, numbers, underscores, dashes, and periods are valid.'
return errors