X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/output/Ext.form.VTypes.html diff --git a/docs/output/Ext.form.VTypes.html b/docs/output/Ext.form.VTypes.html index b2452747..7d7b8468 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