X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/docs/output/Ext.form.VTypes.html diff --git a/docs/output/Ext.form.VTypes.html b/docs/output/Ext.form.VTypes.html index b2452747..478bc985 100644 --- a/docs/output/Ext.form.VTypes.html +++ b/docs/output/Ext.form.VTypes.html @@ -1,199 +1,54 @@ -
-
- Properties - Methods - Events - Direct Link -
-

Class Ext.form.VTypes

- - - - - -
Package:Ext.form
Defined In:VTypes.js
Class:VTypes
Extends:Object
-
- * -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. To add -your own custom VType:
Ext.apply(Ext.form.VTypes, {
+

Class Ext.form.VTypes

Package:Ext.form
Defined In:VTypes.js
Class:VTypes
Extends:Object

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.

+

To add custom VTypes specify the vtype validation +test function, and optionally specify any corresponding error text to display and any keystroke +filtering mask to apply. For example:

+
// custom Vtype for vtype:'time'
+var timeTest = /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/i;
+Ext.apply(Ext.form.VTypes, {
+    //  vtype validation function
+    time: function(val, field) {
+        return timeTest.test(val);
+    },
+    // vtype Text property: The error text to display when the validation function returns false
+    timeText: 'Not a valid time.  Must be in the format "12:34 PM".',
+    // vtype Mask property: The keystroke filter mask
+    timeMask: /[\d\s:amp]/i
+});
+Another example: +
// custom Vtype for vtype:'IPAddress'
+Ext.apply(Ext.form.VTypes, {
     IPAddress:  function(v) {
         return /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(v);
     },
-    IPAddressText: 'Must be a numeric IP address'
-});


This class is a singleton and cannot be created directly.
- -
- -

Public Properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PropertyDefined By
  - - alphaMask : RegExp
- The keystroke filter mask to be applied on alpha input
-
VTypes
  - - alphaText : String
- The error text to display when the alpha validation function returns false
-
VTypes
  - - alphanumMask : RegExp
- The keystroke filter mask to be applied on alphanumeric input
-
VTypes
  - - alphanumText : String
- The error text to display when the alphanumeric validation function returns false
-
VTypes
  - - emailText : String
- The error text to display when the email validation function returns false
-
VTypes
  - - urlText : String
- The error text to display when the url validation function returns false
-
VTypes
- -

Public Methods

- - - - - - - - - - - - - - - - - -
MethodDefined By

Public Events

This class has no public events.
\ No newline at end of file