I have a validation on an input field to prevent Arabic characters from being entered. The code works quite well except that you can’t add spaces.
https://jsfiddle.net/17b062wu/
jQuery(".no-arabic").on("input", function () {
var inputValue = jQuery(this).val();
var validChars = /^.*[u0600-u06FFs]+.*$/;
if (validChars.test(inputValue))
{
alert('arabic text is not allowed');
jQuery(this).val('');
}
});