Prasath
Prasath

Reputation: 1284

Extjs Numberfield discards leading zero

I have Extjs Numberfield in my form and this needs to send the number just like the user types it in. The number is an serial number of an ID Card, in this case I need the leeding zeros. But the Numberfield discards all zeros in front an begins with the first number unequal zero. How can I change this?

Regards, Prasath M

Upvotes: 3

Views: 2213

Answers (1)

jansepke
jansepke

Reputation: 1979

you should use a textfield with a custom validator so you can only insert numbers, cause ExtJS will store the value of a numberfield as an integer and a integer has no leading zeros.

Upvotes: 4

Related Questions