0

I'am working on the Magento store that have Arabic language store and English language store.

I have added the "letters-only" validation on firstName input field on registration page and when I check this validation on English version its working fine, but in Arabic version validation not working.

"Letters only" validation not accept Arabic string.

I'm trying below rules one by one but no luck:-

//return this.optional(element) || !/^[0-9_]+$/i.test(value);
return this.optional(element) || /^[\p{Arabic}a-zA-Z\- .ـ]+$/i.test(value);             
return this.optional(element) || /^[a-zA-Z\-+,()/'\s\p{Arabic}]+$/i.test(value);
return this.optional(element) || /^[\s\p{Arabic}]+$/i.test(value);

Please suggest any solution to get rid this issue So in Arabic version user can add their information.

Thanks!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.