Ext.form.field.Text (xtype: textfield) Generally used in the form (Form) panel to receive general input, textfield corresponds to standard html text type input. It can be used as a base class for more complex input controls (such as Ext.form.field.TextArea or Ext.form.field.ComboBox).
basic use
Ext.form.field.Text, the corresponding xtype is textfield. Components of this type are generally used in forms, and can also be used alone.
The creation of the input box component is very simple. For different methods, the created code is as follows:
- Creation
Ext.create('Ext.form.field.Text',{fieldLabel:'创建式'})
- Profile
{
fieldLabel:'配置式',
xtype:'textfield'
}
The above definition shows the effect as follows:
Validation configuration for the value of the field
- allowBlank , field required
- minLength , the shortest length of the value
- maxLength , to set the maximum length (use enforceMaxLength to add it as a maxlength attribute on the input element)
- regex custom regular expression to validate the value