/* These functions require the jquery.formrestrict.js functions to work!
 *
 * These functions can be used to replace the functionality of the jQuery
 * AlphaNumeric plugin. The usage of this plugin is almost identical to that of
 * the AlphaNumeric plugin.
 */

(function ($) {
    jQuery.fn.alphanumeric = function(r) {
        alphanumericHelper(this, r, true, true);
    };
    jQuery.fn.numeric = function(r) {
        alphanumericHelper(this, r, false, true);
    };
    jQuery.fn.alpha = function(r) {
        alphanumericHelper(this, r, true, false);
    };
    var alphanumericHelper = function(obj, restraints, alpha, numeric) {
        var regex = "";
        if (numeric)
            regex += "0-9";
        if (alpha) {
            if (restraints == undefined || !restraints.allcaps)
                regex += "a-z";
            if (restraints == undefined || !restraints.nocaps)
                regex += "A-Z";
        }
        if (restraints != undefined && restraints.allow != undefined)
            regex += RegExp.escape(restraints.allow);

        $(obj).regexRestrict(RegExp("[^"+regex+"]", "g"))
    };
})(jQuery);

/*
 * Function created by Colin Snover in response to an article by Simon Willison
 * on Regular Expression escaping in JavaScript:
 * http://simonwillison.net/2006/Jan/20/escape/
 */
RegExp.escape = function(text) {
    return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
};

@@ -357,24 +357,31 @@
 , true, true
+, false
 );%0A    %7D;%0A  
@@ -463,16 +463,23 @@
 se, true
+, false
 );%0A    %7D
@@ -555,32 +555,362 @@
 , r, true, false
+, false);%0A    %7D;%0A    jQuery.fn.alphanumericSpaces = function(r) %7B%0A        alphanumericHelper(this, r, true, true, true);%0A    %7D;%0A    jQuery.fn.numericSpaces = function(r) %7B%0A        alphanumericHelper(this, r, false, true, true);%0A    %7D;%0A    jQuery.fn.alphaSpaces = function(r) %7B%0A        alphanumericHelper(this, r, true, false, true
 );%0A    %7D;%0A    va
@@ -972,16 +972,24 @@
  numeric
+, spaces
 ) %7B%0A    
@@ -1008,16 +1008,62 @@
 x = %22%22;%0A
+        if (spaces)%0A            regex += %22 %22;%0A
         

Allow spaces in each method