I have read from one of the blog, for security reasons, its suggested to do the input data validation at the server side not the client side.
From the above stateme
Client side validation is only there to save the client time, so when they input and invalid value it says "Bad value" without the page needing to reload.
Client side validation though should be treated as NO validation, as clients can disable this validation and input bad values.
The server should always validate entered data. Client validation is only for usability.