I have a login form where am accepting Mobile Number of the User for login.
When Mobile Number is submitted, am calling a JavaScript to validate the Mobile Number. My client side validations consists of checks like does Mobile Number starts with 9, 8 or 7 , is the length of Mobile Number equals 10 etc.
Once these kind of validations are done, am checking at Server side if entered Mobile Number and password matches(Authentication).
Since I have some checks in JavaScript, one can view the source and come to know that these kind of checks are there. And one can modify this code and let that to reflect for all Users. For eg., one can change the code which does the check if Mobile Number starts with 9, 8 or 7 and replace 9 with 1(say). So, if one enters Number starting with 9 it will fail.
How to prevent these kind of attacks? Obvious way is to put these checks at server side, but I have atleast 10 different checks and I don't want to overload server side checks.
How can attacker change those values in my JavaScript and let that to reflect for all Users?
EDIT : My client side JavaScript code looks like below,
var checkMobileNumber = form.mobileNumber.value;
if (checkMobileNumber.charAt(0) != 9 && checkMobileNumber.charAt(0) != 8 && checkMobileNumber.charAt(0) != 7) {
//Throw some error
}

