Extjs:整数验证

Extjs : Validation for Integers

本文关键字:验证 整数 Extjs      更新时间:2023-09-26

我想添加一个只能接受整数而不能接受十进制数的字段。

I tried with numberfield as

{
    xtype : 'numberfield',
    fieldLabel : 'number',
}

我不想让它不可编辑

请尝试在numberfield上设置allowDecimals配置,使其看起来像:

{
    xtype : 'numberfield',
    fieldLabel : 'number',
    allowDecimals: false
}