Skip to content

Commit

Permalink
Merge pull request #1144 from markhoney/patch-2
Browse files Browse the repository at this point in the history
Update views.py
  • Loading branch information
usmannasir authored Nov 2, 2023
2 parents a04012c + 4bc1f4c commit 0994d61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userManagment/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ def submitUserCreation(request):
selectedACL = data['selectedACL']

if ACLManager.CheckRegEx("^[\w'\-,.][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*(){}|~<>;:[\]]{2,}$", firstName) == 0:
data_ret = {'status': 0, 'createStatus': 0, 'error_message': 'First Name can only contain Alphabets and should be more then 2 characters..'}
data_ret = {'status': 0, 'createStatus': 0, 'error_message': 'First Name can only contain alphabetic characters, and should be more than 2 characters long...'}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)

if ACLManager.CheckRegEx("^[\w'\-,.][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*(){}|~<>;:[\]]{2,}$", lastName) == 0:
data_ret = {'status': 0, 'createStatus': 0, 'error_message': 'First Name can only contain Alphabets and should be more then 2 characters..'}
data_ret = {'status': 0, 'createStatus': 0, 'error_message': 'Last Name can only contain alphabetic characters, and should be more than 2 characters long...'}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)

Expand Down

0 comments on commit 0994d61

Please sign in to comment.