This enables patrons with names like Étienne or ԱԲԳԱՐ to be registered and retrieved
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13263
dcc99617-32d9-48b4-a31d-
7c20da2025e4
case 'family_name' :
case 'first_given_name' :
case 'second_given_name' :
- value = value.replace(/^\W+/g,'').replace(/\W+$/g,'');
+ value = value.replace(/^[\d\s]+/g,'').replace(/[\d\s]+$/g,'')
break;
}
if (value != '') {
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}(| \S+.*)$/i;
-const nonumRegex = /^[a-zA-Z]\D*$/; /* no numbers, no beginning whitespace */
+const nonumRegex = /^[^\d\s]+[\d]*$/; /* no numbers, no beginning whitespace */
const dateRegex = /^\d{4}-\d{2}-\d{2}/;
const zipRegex = /^\d{5}(-\d{4}|-?$)/; /* 12345 or 12345-6789 */