From b5064cc3369c82c8bf823da4a0f7404a27a82a71 Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 25 May 2009 17:26:08 +0000 Subject: [PATCH] Many of our patrons have names with legitimate spaces in them ("St. Pierre"). Relax the user editor regex accordingly. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@494 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- xul/server/patron/ue_config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xul/server/patron/ue_config.js b/xul/server/patron/ue_config.js index e226568e53..936f4a4a9f 100644 --- a/xul/server/patron/ue_config.js +++ b/xul/server/patron/ue_config.js @@ -27,6 +27,7 @@ const DEFAULT_ADULT_AGE = '18 years'; var dataFields; const laxRegex = /\w+/; +const nameRegex = /^\w+[\w\s]*$/; const numRegex = /^\d+$/; const wordRegex = /^[\w-]+$/; const unameRegex = /^\w[\.\w\@-]*$/; @@ -165,7 +166,7 @@ function uEditDefineData(patron) { errkey : 'ue_bad_firstname', widget : { id : 'ue_firstname', - regex : nonumRegex, + regex : nameRegex, type : 'input', onblur : function(field) { uEditCheckNamesDup('first', field ); @@ -179,7 +180,7 @@ function uEditDefineData(patron) { errkey : 'ue_bad_middlename', widget : { id : 'ue_middlename', - regex : nonumRegex, + regex : nameRegex, type : 'input' } }, @@ -190,7 +191,7 @@ function uEditDefineData(patron) { errkey : 'ue_bad_lastname', widget : { id : 'ue_lastname', - regex : nonumRegex, + regex : nameRegex, type : 'input', onblur : function(field) { uEditCheckNamesDup('last', field ); -- 2.11.0