rbrindley: branch 2.0 r4790 - /branches/2.0/config/js/features2.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri May 15 13:14:41 CDT 2009


Author: rbrindley
Date: Fri May 15 13:14:37 2009
New Revision: 4790

URL: http://svn.asterisk.org/svn-view/asterisk-gui?view=rev&rev=4790
Log:

- fixed an issue in the regexp that improperly validated feature map options


Modified:
    branches/2.0/config/js/features2.js

Modified: branches/2.0/config/js/features2.js
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/js/features2.js?view=diff&rev=4790&r1=4789&r2=4790
==============================================================================
--- branches/2.0/config/js/features2.js (original)
+++ branches/2.0/config/js/features2.js Fri May 15 13:14:37 2009
@@ -617,12 +617,12 @@
 		}
 	}
 
-	if (chks.keypress && val !== '' && !val.match(/[0-9#*][0-9#*]*/)) {
+	if (chks.keypress && val !== '' && !val.match(/^[0-9#\*][0-9#\*]*$/)) {
 		top.log.error('validate: val should only contain 0-9, #, or *.');
 		throw TypeError('Invalid: This should only contain 0-9, #, or *.');
 	}
 
-	if (chks.aststr && !val.match(/[a-zA-Z0-9_-][a-zA-Z0-9_-]*/)) {
+	if (chks.aststr && !val.match(/^[a-zA-Z0-9_-][a-zA-Z0-9_-]*$/)) {
 		top.log.error('validate: val should only contain a-z, A-Z, 0-9, _, or -.');
 		throw TypeError('Invalid: This should only contain a-z, A-Z, 0-9, _, or -');
 	}




More information about the asterisk-gui-commits mailing list