X-Git-Url: https://git.evergreen-ils.org/?p=Evergreen.git;a=blobdiff_plain;f=Evergreen%2Fxul%2Fstaff_client%2Fserver%2Fpatron%2Fue_config.js;h=7f24f8aaadc02568905fe13b43e1f6b230f47714;hp=f98ab7f0a5382912e3b54336b63b11482a86ffaf;hb=98262c0c7a28406688983ed8f8caec532d9cbe9a;hpb=955945f8a900ea90aa32a1a3bd31fedbd005bde2 diff --git a/Evergreen/xul/staff_client/server/patron/ue_config.js b/Evergreen/xul/staff_client/server/patron/ue_config.js index f98ab7f0a5..7f24f8aaad 100644 --- a/Evergreen/xul/staff_client/server/patron/ue_config.js +++ b/Evergreen/xul/staff_client/server/patron/ue_config.js @@ -39,7 +39,8 @@ var myPerms = [ var dataFields; const numRegex = /^\d+$/; -const wordRegex = /^\w+$/; +const wordRegex = /^[\w-]+$/; +const unameRegex = /^\w[\.\w\@-]*$/; const ssnRegex = /^\d{3}-\d{2}-\d{4}$/; const dlRegex = /^[a-zA-Z]{2}-\w+/; /* driver's license */ const phoneRegex = /^\d{3}-\d{3}-\d{4}(| ex\d+)$/i; @@ -77,6 +78,7 @@ function uEditUsrnameBlur(field) { function uEditBarcodeBlur(field) { var barcode = uEditNodeVal(field); if(!barcode) return; + _debug("blurring card with new value " + barcode); var req = new Request(CHECK_BARCODE, SESSION, barcode); req.callback( function(r) { @@ -126,7 +128,7 @@ function uEditDefineData(patron) { errkey : 'ue_bad_username', widget : { id : 'ue_username', - regex : wordRegex, + regex : unameRegex, type : 'input', onblur : uEditUsrnameBlur }