Commit 7d44a42e by yushchenko

add more errors descriptions

parent 5e94de52
......@@ -715,10 +715,17 @@ def create_account(request, post_override=None):
for a in numeric_post_vars:
if len(post_vars[a]) > 0 and not post_vars[a].isdigit():
js['value'] = _("Field must be numeric")
error_str = {
'education_year': _('Education year must be numeric'),
'work_teaching_experience': _('Work teaching experience must be numeric'),
'work_managing_experience': _('Work managing experience must be numeric'),
'work_qualification_category_year': _('Work qualification year must be numeric'),
'contact_phone': _('Contact phone must be numeric')}
js['value'] = error_str[a]
js['field'] = a
return HttpResponse(json.dumps(js))
try:
validate_email(post_vars['email'])
except ValidationError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment