Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
joo.classLoader.prepare("package ext.form",/* {*/


/**
 * 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.
 <p>To add custom VTypes specify the <code><a href="output/Ext.form.TextField.html#Ext.form.TextField-vtype">vtype</a></code> validation test function, and optionally specify any corresponding error text to display and any keystroke filtering mask to apply. For example:</p><pre><code>// 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
 });
 </code></pre>Another example: <pre><code>// 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
 });
 </code></pre>
 *
 * <p>Copyright &#169; 2011 Sencha Inc.</p>
 *

 * <p>This interface defines the type of the singleton VTypes.</p>
 * @see ext.form.#VTypes ext.form.VTypes
 * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes Sencha Docs Ext JS 3.4
 */
"public interface IVTypes",1,function($$private){return[ /*

  /**
   The keystroke filter mask to be applied on alpha input. Defaults to: <tt>/[a-z_]/i</tt>
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-property-alphaMask Sencha Docs Ext JS 3.4
   * /
  function alphaMask():RegExp*/,/*

  /**
   * @private
   * /
  function alphaMask(value:RegExp):void*/,/*

  /**
   The error text to display when the alpha validation function returns false. Defaults to: <tt>'This field should only contain letters and _'</tt>
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-property-alphaText Sencha Docs Ext JS 3.4
   * /
  function alphaText():String*/,/*

  /**
   * @private
   * /
  function alphaText(value:String):void*/,/*

  /**
   The keystroke filter mask to be applied on alphanumeric input. Defaults to: <tt>/[a-z0-9_]/i</tt>
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-property-alphanumMask Sencha Docs Ext JS 3.4
   * /
  function alphanumMask():RegExp*/,/*

  /**
   * @private
   * /
  function alphanumMask(value:RegExp):void*/,/*

  /**
   The error text to display when the alphanumeric validation function returns false. Defaults to: <tt>'This field should only contain letters, numbers and _'</tt>
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-property-alphanumText Sencha Docs Ext JS 3.4
   * /
  function alphanumText():String*/,/*

  /**
   * @private
   * /
  function alphanumText(value:String):void*/,/*

  /**
   The keystroke filter mask to be applied on email input. See the <a href="output/Ext.form.VTypes.html#Ext.form.VTypes-email">email</a> method for information about more complex email validation. Defaults to: <tt>/[a-z0-9_\.\-\+\'&#64;]/i</tt>
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-property-emailMask Sencha Docs Ext JS 3.4
   * /
  function emailMask():RegExp*/,/*

  /**
   * @private
   * /
  function emailMask(value:RegExp):void*/,/*

  /**
   The error text to display when the email validation function returns false. Defaults to: <tt>'This field should be an e-mail address in the format "user&#64;example.com"'</tt>
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-property-emailText Sencha Docs Ext JS 3.4
   * /
  function emailText():String*/,/*

  /**
   * @private
   * /
  function emailText(value:String):void*/,/*

  /**
   The error text to display when the url validation function returns false. Defaults to: <tt>'This field should be a URL in the format "http:/'+'/www.example.com"'</tt>
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-property-urlText Sencha Docs Ext JS 3.4
   * /
  function urlText():String*/,/*

  /**
   * @private
   * /
  function urlText(value:String):void*/,/*

  /**
   * The function used to validate alpha values
   *
   * @param value The value
   * @return true if the RegExp test passed, and false if not.
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-method-alpha Sencha Docs Ext JS 3.4
   * /
  function alpha(value:String):Boolean*/,/*

  /**
   * The function used to validate alphanumeric values
   *
   * @param value The value
   * @return true if the RegExp test passed, and false if not.
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-method-alphanum Sencha Docs Ext JS 3.4
   * /
  function alphanum(value:String):Boolean*/,/*

  /**
   * 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 <a href="http://en.wikipedia.org/wiki/E-mail_address">Wikipedia article on email addresses</a> for additional information. This implementation is intended to validate the following emails:<tt>'barney&#64;example.de', 'barney.rubble&#64;example.com', 'barney-rubble&#64;example.coop', 'barney+rubble&#64;example.com'</tt> .
   *
   * @param value The email address
   * @return true if the RegExp test passed, and false if not.
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-method-email Sencha Docs Ext JS 3.4
   * /
  function email(value:String):Boolean*/,/*

  /**
   * The function used to validate URLs
   *
   * @param value The URL
   * @return true if the RegExp test passed, and false if not.
   * @see http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.VTypes-method-url Sencha Docs Ext JS 3.4
   * /
  function url(value:String):Boolean*/,

undefined];},[],[], "0.8.0", "2.0.12"
);
New to GrepCode? Check out our FAQ X