From 867cf5e329762a20dd46ea65a731fa75975284b3 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 6 Aug 2014 19:28:24 -0600 Subject: [PATCH] Fix typo in Error handling controller code On the frontend, the error message 'Username already exist' appears when creating a user with the same username as an existing user. Grammatically, this error looks strange. A more proper error message would be 'Username already exists'. Possibly later on support can be added to properly conjugate this error message for a 'plural' field. --- app/controllers/errors.server.controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/errors.server.controller.js b/app/controllers/errors.server.controller.js index e4604f8c9c..935a9299d4 100644 --- a/app/controllers/errors.server.controller.js +++ b/app/controllers/errors.server.controller.js @@ -8,10 +8,10 @@ var getUniqueErrorMessage = function(err) { try { var fieldName = err.err.substring(err.err.lastIndexOf('.$') + 2, err.err.lastIndexOf('_1')); - output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exist'; + output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exists'; } catch(ex) { - output = 'Unique field already exist'; + output = 'Unique field already exists'; } return output; @@ -39,4 +39,4 @@ exports.getErrorMessage = function(err) { } return message; -}; \ No newline at end of file +};