diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/util.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/util.js b/src/client/util.js index a041c813..ca644fed 100644 --- a/src/client/util.js +++ b/src/client/util.js @@ -74,6 +74,15 @@ define(['jquery'], function($) { }); } + function input_validation__password(password_first, password_second) { + if (password_first != password_second) { + throw { message: 'passwords do not match' } + } + if (password_first.length < 8) { + throw { message: 'password too short - must be at least 8 charachters long' } + } + } + return { assert: assert, set_from_array: set_from_array, @@ -82,5 +91,6 @@ define(['jquery'], function($) { array_diff: array_diff, getParameterByName: getParameterByName, form_common__rest_post: form_common__rest_post, + input_validation__password: input_validation__password, }; }); |
