X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/source/VTypes.html diff --git a/docs/source/VTypes.html b/docs/source/VTypes.html index 887a0435..bfbc7c2d 100644 --- a/docs/source/VTypes.html +++ b/docs/source/VTypes.html @@ -1,11 +1,18 @@ - - - The source code - - - - -
/** + + + + The source code + + + + +
/*!
+ * Ext JS Library 3.2.1
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.form.VTypes *

This is a singleton object which contains a set of commonly used field validation functions. * The validations provided are basic and intended to be easily customizable and extended.

@@ -26,7 +33,7 @@ Ext.apply(Ext.form.VTypes, { timeMask: /[\d\s:amp]/i }); *
- * Another example: + * Another example: *

 // custom Vtype for vtype:'IPAddress'
 Ext.apply(Ext.form.VTypes, {
@@ -41,10 +48,10 @@ Ext.apply(Ext.form.VTypes, {
  */
 Ext.form.VTypes = function(){
     // closure these in so they are only created once.
-    var alpha = /^[a-zA-Z_]+$/;
-    var alphanum = /^[a-zA-Z0-9_]+$/;
-    var email = /^(\w+)([-+.][\w]+)*@(\w[-\w]*\.){1,5}([A-Za-z]){2,4}$/;
-    var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+    var alpha = /^[a-zA-Z_]+$/,
+        alphanum = /^[a-zA-Z0-9_]+$/,
+        email = /^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,
+        url = /(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
 
     // All these messages and functions are configurable
     return {
@@ -52,7 +59,7 @@ Ext.form.VTypes = function(){
          * The function used to validate email addresses.  Note that this is a very basic validation -- complete
          * validation per the email RFC specifications is very complex and beyond the scope of this class, although
          * this function can be overridden if a more comprehensive validation scheme is desired.  See the validation
-         * section of the Wikipedia article on email addresses 
+         * section of the Wikipedia article on email addresses
          * for additional information.  This implementation is intended to validate the following emails:
          * 'barney@example.de', 'barney.rubble@example.com', 'barney-rubble@example.coop', 'barney+rubble@example.com'
          * .
@@ -69,12 +76,12 @@ Ext.form.VTypes = function(){
          */
         'emailText' : 'This field should be an e-mail address in the format "user@example.com"',
         
/** - * The keystroke filter mask to be applied on email input. See the {@link #email} method for + * The keystroke filter mask to be applied on email input. See the {@link #email} method for * information about more complex email validation. Defaults to: * /[a-z0-9_\.\-@]/i * @type RegExp */ - 'emailMask' : /[a-z0-9_\.\-@]/i, + 'emailMask' : /[a-z0-9_\.\-@\+]/i,
/** * The function used to validate URLs @@ -90,7 +97,7 @@ Ext.form.VTypes = function(){ * @type String */ 'urlText' : 'This field should be a URL in the format "http:/'+'/www.example.com"', - +
/** * The function used to validate alpha values * @param {String} value The value @@ -133,6 +140,7 @@ Ext.form.VTypes = function(){ */ 'alphanumMask' : /[a-z0-9_]/i }; -}();
- +}(); +
+ \ No newline at end of file