X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/output/Ext.form.VTypes.html diff --git a/docs/output/Ext.form.VTypes.html b/docs/output/Ext.form.VTypes.html deleted file mode 100644 index 478bc985..00000000 --- a/docs/output/Ext.form.VTypes.html +++ /dev/null @@ -1,54 +0,0 @@ -
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 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',
-    IPAddressMask: /[\d\.]/i
-});


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. Defaults to: -/[a-z_]/i
VTypes
 alphanumMask : RegExp
The keystroke filter mask to be applied on alphanumeric input. Defaults to: -/[a-z0-9_]/i
VTypes

Public Methods

MethodDefined By

Public Events

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