Yii Framework Forum: Valdiate Arabic Text - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Valdiate Arabic Text Rate Topic: ***** 1 Votes

#1 User is offline   samilo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 231
  • Joined: 04-October 12

Posted 24 March 2013 - 08:13 AM

Hi all

I used this validate match to force users to write in Arabic alphabetic .

Model
    	array('fname_ar,lname_ar,fa_name_ar','match', 'pattern'=>'/^([\p{Arabic}\s])+$/u' ,'message'=>'{attribute} يجب أن يكون فقط باللغة العربية ','on'=>'update,insert'), 


But still not work and form display error message ?

How To fix that ?

Thanks in advance
0

#2 User is offline   samilo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 231
  • Joined: 04-October 12

Posted 25 March 2013 - 06:34 AM

Up :(
0

#3 User is offline   samilo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 231
  • Joined: 04-October 12

Posted 25 March 2013 - 08:59 AM

I fixed it :) and this my new code

model :

 array('fname_ar,lname_ar,fa_name_ar','match', 'pattern'=>'/^[\s\x{0600}-\x{06FF}\x{0750}-\x{077F}\x{08A0}-\x{08FF}\x{FB50}-\x{FDFF}\x{FE70}-\x{FEFF}\x{10E60}\x{10E60}—\x{10E7F}\x{1EE00}—\x{1EEFF}]+$/u' ,'message'=>'{attribute} يجب أن يكون فقط باللغة العربية ','on'=>'update,insert'), 

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users