diff options
author | Byron Jones <glob@mozilla.com> | 2015-03-23 05:49:54 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-03-23 05:50:14 +0100 |
commit | bc5f247fcfb4a6dd12a190a703c44a9d36bb4158 (patch) | |
tree | 83c0040865f477e511741c567e661608b06f814c /extensions/REMO/web/js | |
parent | 9d045e4d060bc531e4243c621d07c79699fd22c8 (diff) | |
download | bugzilla-bc5f247fcfb4a6dd12a190a703c44a9d36bb4158.tar.gz bugzilla-bc5f247fcfb4a6dd12a190a703c44a9d36bb4158.tar.xz |
Bug 1141165: Enforce mandatory field on form.reps.mentorship
Diffstat (limited to 'extensions/REMO/web/js')
-rw-r--r-- | extensions/REMO/web/js/moz_reps.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/extensions/REMO/web/js/moz_reps.js b/extensions/REMO/web/js/moz_reps.js index 88c60df51..e269e4445 100644 --- a/extensions/REMO/web/js/moz_reps.js +++ b/extensions/REMO/web/js/moz_reps.js @@ -49,9 +49,10 @@ $(document).ready(function() { $('label.required').each(function (index) { var id = $(this).attr("for"); var input = $("#" + id); + var value = input.val().trim(); if (id == 'mozillian') { - if (!input.val().match(mozillian_re)) { + if (!value.match(mozillian_re)) { input.addClass("missing"); errors.push("The Mozillian Account URL is invalid"); event.preventDefault(); @@ -61,7 +62,7 @@ $(document).ready(function() { } } else { - if (input.val() == "") { + if (value == "") { input.addClass("missing"); missing = true; event.preventDefault(); |