Control of empty fields in a form via JavaScript I would like to know if it is safe enough to create via JavaScript control of empty fields. Here is my example in detail:

    &lt;script language='javascript'&gt;
        function validate () {
            if(document.getElementById('title').value=="") {
                alert("Enter a Title!");
                return false;
            }
            if(document.getElementById('description').value=="") {
                alert("Enter a Description!");
                return false;
            }
            if(document.getElementById('image').value=="") {
                alert("Inser an Image!");
                return false;
            }
    alert("Success");
    return true;
}
&lt;/script&gt;
It's okay to do the validations in the client side for a better user experience, so the user does not have to wait the response of the server or make a request to know if there is any field that he left incomplete. But you have to do the same validations on the server, because if someone makes a direct request to your server with empty fields, that request is not going through the javascript validations, so your application is going to crash.