I am trying to validate the arabic and enligsh input field. I search in the stackoverflow and I found something but its not actually working. I want to validate the Full Name (which will have space), Mobile and title. Its working fine for english but not in arabic.
FULL NAME:
if(!preg_match('/^[a-zA-Z ]{6,60}$/', $sendername) &&
!preg_match('/^[\u0600-\u06FF]{6,60}$/', $sendername)
)
{
}
MOBILE:
if(!(preg_match('/^[0-9]{8,15}$/', $senderphone)) &&
!(preg_match('/^[\u10E60—\u10E7F]{8,15}$/', $senderphone))
{
}
TITLE:
if( (strlen($sendersubject) < 10) || (strlen($sendersubject) > 100) )
{
}
Thanks dear for your support