Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / source / widgets / form / VTypes.js
diff --git a/source/widgets/form/VTypes.js b/source/widgets/form/VTypes.js
deleted file mode 100644 (file)
index aba1024..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*\r
- * Ext JS Library 2.2.1\r
- * Copyright(c) 2006-2009, Ext JS, LLC.\r
- * licensing@extjs.com\r
- * \r
- * http://extjs.com/license\r
- */\r
-\r
-/**\r
- * @class Ext.form.VTypes\r
- * This is a singleton object which contains a set of commonly used field validation functions.\r
- * The validations provided are basic and intended to be easily customizable and extended. To add\r
- * your own custom VType:<pre><code>\r
-Ext.apply(Ext.form.VTypes, {\r
-    IPAddress:  function(v) {\r
-        return /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(v);\r
-    },\r
-    IPAddressText: 'Must be a numeric IP address'\r
-});\r
-</code></pre>\r
- * @singleton\r
- */\r
-Ext.form.VTypes = function(){\r
-    // closure these in so they are only created once.\r
-    var alpha = /^[a-zA-Z_]+$/;\r
-    var alphanum = /^[a-zA-Z0-9_]+$/;\r
-    var email = /^([\w]+)(\.[\w]+)*@([\w\-]+\.){1,5}([A-Za-z]){2,4}$/;\r
-    var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;\r
-\r
-    // All these messages and functions are configurable\r
-    return {\r
-        /**\r
-         * The function used to validate email addresses.  Note that this is a very basic validation -- complete\r
-         * validation per the email RFC specifications is very complex and beyond the scope of this class, although\r
-         * this function can be overridden if a more comprehensive validation scheme is desired.  See the validation\r
-         * section of the <a href="http://en.wikipedia.org/wiki/E-mail_address">Wikipedia article on email addresses</a> \r
-         * for additional information.\r
-         * @param {String} value The email address\r
-         */\r
-        'email' : function(v){\r
-            return email.test(v);\r
-        },\r
-        /**\r
-         * The error text to display when the email validation function returns false\r
-         * @type String\r
-         */\r
-        'emailText' : 'This field should be an e-mail address in the format "user@domain.com"',\r
-        /**\r
-         * The keystroke filter mask to be applied on email input.  See the {@link #email} method for \r
-         * information about more complex email validation.\r
-         * @type RegExp\r
-         */\r
-        'emailMask' : /[a-z0-9_\.\-@]/i,\r
-\r
-        /**\r
-         * The function used to validate URLs\r
-         * @param {String} value The URL\r
-         */\r
-        'url' : function(v){\r
-            return url.test(v);\r
-        },\r
-        /**\r
-         * The error text to display when the url validation function returns false\r
-         * @type String\r
-         */\r
-        'urlText' : 'This field should be a URL in the format "http:/'+'/www.domain.com"',\r
-        \r
-        /**\r
-         * The function used to validate alpha values\r
-         * @param {String} value The value\r
-         */\r
-        'alpha' : function(v){\r
-            return alpha.test(v);\r
-        },\r
-        /**\r
-         * The error text to display when the alpha validation function returns false\r
-         * @type String\r
-         */\r
-        'alphaText' : 'This field should only contain letters and _',\r
-        /**\r
-         * The keystroke filter mask to be applied on alpha input\r
-         * @type RegExp\r
-         */\r
-        'alphaMask' : /[a-z_]/i,\r
-\r
-        /**\r
-         * The function used to validate alphanumeric values\r
-         * @param {String} value The value\r
-         */\r
-        'alphanum' : function(v){\r
-            return alphanum.test(v);\r
-        },\r
-        /**\r
-         * The error text to display when the alphanumeric validation function returns false\r
-         * @type String\r
-         */\r
-        'alphanumText' : 'This field should only contain letters, numbers and _',\r
-        /**\r
-         * The keystroke filter mask to be applied on alphanumeric input\r
-         * @type RegExp\r
-         */\r
-        'alphanumMask' : /[a-z0-9_]/i\r
-    };\r
-}();
\ No newline at end of file