Https://www.codecademy.com/courses/learn-html/lessons/html-forms/exercises/number-input

In the “How many patties would you like?” field, I could type letter “e”. But the value of the type attribute was set to number. Why is that? Is there anything wrong with these code?

It should not let you type the letter e. Not sure why it’s letting you. You can click on report an issue, maybe if you put a value=“0” it would restrict it more , but not supposed to need it.

1 Like

I think one is able to put any symbol in a form with the attribute type='number'. The only difference is that the server side may get confused, and you can increment forms with that attribute. The only way to stop values being sent to the server is with a bit of validation the form.

1 Like