It is a good idea to apply quick client side validation on file / image upload in javaScript, You can easily check file extension and…
Validating email address on server side is more secure way to prevent from span entry, Some people disabled javascript on their browser and enter wrong…