in reply to Re^5: CGI - input number fields
in thread CGI - input number fields
In a browser that does not understand HTML5, <input type="number"> would be handled like <input type="any nonsense you can think of">, i.e. like <input type="text">.
Anyway, one should never rely on the client to do input validation. Input validation always has to be done on the server. Simply because any client side input validation can be bypassed, with nearly zero effort.
Client-side validation is not useless, but it is only an optional add-on to the required server-side validation. Client-side validation can be used to reduce the server load by preventing the form submit until all input is valid. It can mark wrong input while typing. It can highlight fields lacking required information. It can show usage hints in case of wrong input.
Alexander
|
|---|