1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.form.VTypes-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.form.VTypes-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.form.VTypes-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="bookmark" href="../docs/?class=Ext.form.VTypes"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
8 <h1>Class Ext.form.VTypes</h1>
9 <table cellspacing="0">
10 <tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr>
11 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/VTypes.js" target="_blank">VTypes.js</a></td></tr>
12 <tr><td class="label">Class:</td><td class="hd-info">VTypes</td></tr>
13 <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
15 <div class="description">
17 This is a singleton object which contains a set of commonly used field validation functions.
18 The validations provided are basic and intended to be easily customizable and extended. To add
19 your own custom VType:<pre><code>Ext.apply(Ext.form.VTypes, {
20 IPAddress: <b>function</b>(v) {
21 <b>return</b> /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(v);
23 IPAddressText: <em>'Must be a numeric IP address'</em>
24 });</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i> </div>
26 <div class="hr"></div>
27 <a id="Ext.form.VTypes-props"></a>
28 <h2>Public Properties</h2>
29 <table cellspacing="0" class="member-table">
31 <th class="sig-header" colspan="2">Property</th>
32 <th class="msource-header">Defined By</th>
34 <tr class="property-row">
\r
35 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
37 <a id="Ext.form.VTypes-alphaMask"></a>
\r
38 <b>alphaMask</b> : RegExp <div class="mdesc">
\r
39 The keystroke filter mask to be applied on alpha input </div>
\r
41 <td class="msource">VTypes</td>
\r
43 <tr class="property-row alt">
\r
44 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
46 <a id="Ext.form.VTypes-alphaText"></a>
\r
47 <b>alphaText</b> : String <div class="mdesc">
\r
48 The error text to display when the alpha validation function returns false </div>
\r
50 <td class="msource">VTypes</td>
\r
52 <tr class="property-row">
\r
53 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
55 <a id="Ext.form.VTypes-alphanumMask"></a>
\r
56 <b>alphanumMask</b> : RegExp <div class="mdesc">
\r
57 The keystroke filter mask to be applied on alphanumeric input </div>
\r
59 <td class="msource">VTypes</td>
\r
61 <tr class="property-row alt">
\r
62 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
64 <a id="Ext.form.VTypes-alphanumText"></a>
\r
65 <b>alphanumText</b> : String <div class="mdesc">
\r
66 The error text to display when the alphanumeric validation function returns false </div>
\r
68 <td class="msource">VTypes</td>
\r
70 <tr class="property-row expandable">
\r
71 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
73 <a id="Ext.form.VTypes-emailMask"></a>
\r
74 <b>emailMask</b> : RegExp <div class="mdesc">
\r
75 <div class="short">The keystroke filter mask to be applied on email input. See the email method for
76 information about more complex ema...</div>
\r
78 The keystroke filter mask to be applied on email input. See the <a ext:cls="Ext.form.VTypes" ext:member="email" href="output/Ext.form.VTypes.html#email">email</a> method for
79 information about more complex email validation. </div>
\r
82 <td class="msource">VTypes</td>
\r
84 <tr class="property-row alt">
\r
85 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
87 <a id="Ext.form.VTypes-emailText"></a>
\r
88 <b>emailText</b> : String <div class="mdesc">
\r
89 The error text to display when the email validation function returns false </div>
\r
91 <td class="msource">VTypes</td>
\r
93 <tr class="property-row">
\r
94 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
96 <a id="Ext.form.VTypes-urlText"></a>
\r
97 <b>urlText</b> : String <div class="mdesc">
\r
98 The error text to display when the url validation function returns false </div>
\r
100 <td class="msource">VTypes</td>
\r
103 <a id="Ext.form.VTypes-methods"></a>
104 <h2>Public Methods</h2>
105 <table cellspacing="0" class="member-table">
107 <th class="sig-header" colspan="2">Method</th>
108 <th class="msource-header">Defined By</th>
110 <tr class="method-row expandable">
\r
111 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
113 <a id="Ext.form.VTypes-alpha"></a>
\r
114 <b>alpha</b>( <code>String value</code> ) : void <div class="mdesc">
\r
115 <div class="short">The function used to validate alpha values</div>
\r
117 The function used to validate alpha values <div class="mdetail-params">
\r
118 <strong>Parameters:</strong>
\r
119 <ul><li><code>value</code> : String<div class="sub-desc">The value</div></li> </ul>
\r
120 <strong>Returns:</strong>
\r
122 <li><code>void</code></li>
\r
128 <td class="msource">VTypes</td>
\r
130 <tr class="method-row alt expandable">
\r
131 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
133 <a id="Ext.form.VTypes-alphanum"></a>
\r
134 <b>alphanum</b>( <code>String value</code> ) : void <div class="mdesc">
\r
135 <div class="short">The function used to validate alphanumeric values</div>
\r
137 The function used to validate alphanumeric values <div class="mdetail-params">
\r
138 <strong>Parameters:</strong>
\r
139 <ul><li><code>value</code> : String<div class="sub-desc">The value</div></li> </ul>
\r
140 <strong>Returns:</strong>
\r
142 <li><code>void</code></li>
\r
148 <td class="msource">VTypes</td>
\r
150 <tr class="method-row expandable">
\r
151 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
153 <a id="Ext.form.VTypes-email"></a>
\r
154 <b>email</b>( <code>String value</code> ) : void <div class="mdesc">
\r
155 <div class="short">The function used to validate email addresses. Note that this is a very basic validation -- complete
156 validation per ...</div>
\r
158 The function used to validate email addresses. Note that this is a very basic validation -- complete
159 validation per the email RFC specifications is very complex and beyond the scope of this class, although
160 this function can be overridden if a more comprehensive validation scheme is desired. See the validation
161 section of the <a href="http://en.wikipedia.org/wiki/E-mail_address">Wikipedia article on email addresses</a>
162 for additional information. <div class="mdetail-params">
\r
163 <strong>Parameters:</strong>
\r
164 <ul><li><code>value</code> : String<div class="sub-desc">The email address</div></li> </ul>
\r
165 <strong>Returns:</strong>
\r
167 <li><code>void</code></li>
\r
173 <td class="msource">VTypes</td>
\r
175 <tr class="method-row alt expandable">
\r
176 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
178 <a id="Ext.form.VTypes-url"></a>
\r
179 <b>url</b>( <code>String value</code> ) : void <div class="mdesc">
\r
180 <div class="short">The function used to validate URLs</div>
\r
182 The function used to validate URLs <div class="mdetail-params">
\r
183 <strong>Parameters:</strong>
\r
184 <ul><li><code>value</code> : String<div class="sub-desc">The URL</div></li> </ul>
\r
185 <strong>Returns:</strong>
\r
187 <li><code>void</code></li>
\r
193 <td class="msource">VTypes</td>
\r
196 <a id="Ext.form.VTypes-events"></a>
197 <h2>Public Events</h2>
198 <div class="no-members">This class has no public events.</div>