Many of our patrons have names with legitimate spaces in them ("St. Pierre").
authordbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Mon, 25 May 2009 17:26:08 +0000 (17:26 +0000)
committerdbs <dbs@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Mon, 25 May 2009 17:26:08 +0000 (17:26 +0000)
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

index e226568..936f4a4 100644 (file)
@@ -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 );