3 ms·
It is actually very common to intercept the submit event and do cleanup on the frontend, it is basically the default behavior for all modern frameworks. And if
by runarberg 4y ago
It is actually very common to intercept the submit event and do cleanup on the frontend, it is basically the default behavior for all modern frameworks. And if you do that, you can do nice things like submit a proper JSON (e.g. { "number": 42 } as opposed to { "number": "42" }), or use `inputElement.valueAsNumber` to let the browser handle all the oddities of typing a number in a localized way.