Using the number type for short answers
When using the “Short answer” field in combination with the type “Number”, you may experience some “oddities” you might not expect.
For example, you can enter "E" or "e" into an HTML input field with type="number" because the HTML5 specification supports scientific notation (exponential notation) in number inputs.
Why "E" is allowed
The letter "E" (or "e") represents the exponential part in scientific notation, where:
Emeans "times 10 to the power of"1.5e3= 1.5 × 10³ = 1,5002E-4= 2 × 10⁻⁴ = 0,0002
Valid examples in number inputs
<input type="number" value="1.23e4"> <!-- 12,300 --><input type="number" value="5e-2"> <!-- 0,05 --><input type="number" value="1E+6"> <!-- 1,000,000 -->
What the browser accepts
In a type="number" input, these characters are typically allowed:
Digits (0-9)
Decimal point (.)
Minus sign (-) for negative numbers
Plus sign (+) for positive exponents
E or e for scientific notation
Validation behavior
The browser will validate that the scientific notation is properly formatted
Invalid formats (like "1ee3" or "e5") will be rejected
The value property will return the actual numeric value, not the scientific notation string
This is intentional behavior according to the HTML5 specification, designed to support the full range of numeric input that people might need, including very large or very small numbers that are more convenient to express in scientific notation.
If you want a truly numeric only field, you can add a “Regex” validation rule with the following condition: /^[0-9]+$/ . If you need to support negative numbers, use /^-?\d+$/ and if you need decimal numbers, you may use /^\d+(\.\d+)?$/.