JavaScript. What should be changed in the regex in order to allow only alphabets with spaces anywhere? we may sometime requirement to add validation for prevent special characters in our laravel application. (userGetData >= 65 && userGetData <= 120) && (userGetData != 32 && userGetData != 0)) { event.preventDefault (); } }); }); $(document).ready(function(){. If left unspecified, removes and returns all rules. TAGs: jQuery, Regular Expressions, Password TextBox, TextBox. Click OK. Example 1: This example using the approach discussed above using JavaScript. - Be sure not to include personal data - Do not include ... jQuery UI 1.9.2 Framework