This usually happens if the javascript contains more functions than just the validation. In such cases, the way to handle it is by using proxy interceptors. You can use BurpSuite for this. First, give valid inputs and capture the requests in Burp. This ensures that the validation is done. After that, modify the value in Burp and forward the request to the server.
To know more join our Ethical Hacking Course Online today.