564
Views
7
Comments
Solved
Why OS field numeric we can input character 'e'
Question

That happens when you have numerical type input. You can type 'e' character but never stored back so it's safe but it's annoying.

2026-06-05 12-38-17
Eduardo Jauch
Solution

Hi Halim,

Because 'e' is a valid number character. 

This is the HTML specification:

A floating-point number consists of the following parts, in exactly the following order:

  1. Optionally, the first character may be a "-" character.
  2. One or more characters in the range "0—9".
  3. Optionally, the following parts, in exactly the following order:
    1. a "." character
    2. one or more characters in the range "0—9"
  4. Optionally, the following parts, in exactly the following order:
    1. a "e" character or "E" character
    2. optionally, a "-" character or "+" character
    3. One or more characters in the range "0—9".
2017-02-23 11-12-25
Eric Halim

So why we can't save it anyway if it is allowed?

2026-06-05 12-38-17
Eduardo Jauch

Possibly because you are not using it correctly.

'e' is the exponential symbol. So, to it to be valid, you must use it like this:

2e5 or 10e-3

if it is not followed by the exponential value, it is not valid. And probably must be also preceded by something.

2017-02-23 11-12-25
Eric Halim

I see thanks

2026-07-28 08-35-54
Nhorwin John Villano

Hi,

Is it possible to disable the input widget to accept 'e' so that it can only accept numerical values like (0-9)?

Thanks

Regards,

Nhorwin

2021-10-25 07-22-03
Flávio Saraiva

Nhorwin John Villano wrote:

Hi,

Is it possible to disable the input widget to accept 'e' so that it can only accept numerical values like (0-9)?

Thanks

Regards,

Nhorwin

Nhorwin John Villano have you find a solution?


UserImage.jpg
Pedro Ricarte

I am not...

I have an input widget where's my data type is number, but i only want the 0 to 9 digits, and avoid the user to put the "e" and the "-" (negative) char. How can I do?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.