diff options
Diffstat (limited to 'StoneIsland/www/js/lib/account/ProfileView.js')
| -rw-r--r-- | StoneIsland/www/js/lib/account/ProfileView.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js index 3c37c835..83ab0cdc 100644 --- a/StoneIsland/www/js/lib/account/ProfileView.js +++ b/StoneIsland/www/js/lib/account/ProfileView.js @@ -22,10 +22,10 @@ var ProfileView = FormView.extend({ "Email": "Please enter a valid email address.", }, - validate_fields: function(errors){ - if (! data.CurrentPassword && data.NewPassword) { errors.push("CurrentPassword", "Please enter your current password.") } - if (data.CurrentPassword && ! data.NewPassword) { errors.push("NewPassword", "Please enter your new password.") } - if (data.NewPassword && data.NewPassword.length < 7) { errors.push("CurrentPassword", "New password must be 7 characters or more.") } + validate_fields: function(data, errors){ + if (! data.CurrentPassword && data.NewPassword) { errors.push([ "CurrentPassword", "Please enter your current password." ]) } + if (data.CurrentPassword && ! data.NewPassword) { errors.push([ "NewPassword", "Please enter your new password." ]) } + if (data.NewPassword && data.NewPassword.length < 7) { errors.push([ "CurrentPassword", "New password must be 7 characters or more." ]) } }, success: function(data){ |
