I totally understand that JavaScript should be used to enhance a users experience, however I use it sometimes to validate the input for example to check if the password textbox is more than 5 characters or to check if the username entered in the username textbox already exists. As you can imagine if the password is less than 5 characters or the username already exists, the register button is disabled.
However, this can altered from the users browser, so is their any better way of validating the user's input?
I understand I can validate it all through the server just by checking text boxes when the register button is clicked but surely their must be better ways as such that a user cannot alter?
BTW: I'm using Visual Studio C# ASP.NET
Also, am I correct to think that regex expressions can also be altered at the clients side