Hi, if you are able to write validation scripts for different fields in the form and the validation is not working then there might be an issue with your script (or) AEM might not be able to see your script.
In case, you think your script is right and you have used proper functions you can try with the following options:
1. add console and alert statements in the script and see if they are working
2. check the console in the browser for any js related errors
3. use the browser's inbuilt debugger to debug your js code
If AEM is not able to see your script, make sure you have put the js file at the right place. Use console and alert statements to make sure your script is working.