Re: Two alphaNumeric validation on model, but I get a preg_match error on line 187, [CORE/cake/libs/validation.php]
Anyone? :( -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) On Wed, Jan 14, 2009 at 1:34 PM, Louie Miranda lmira...@gmail.com wrote: Hello, I tried two alphaNumeric validation, but I get a preg_match error. *Warning (2): preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 [CORE/cake/libs/validation.php, line 847]* My code var $validate = array( /* * Validation: For authorization * Start */ 'officer_name'=array( 'alphaNumeric'=array( 'rule'='alphaNumeric', 'required'=true, 'message'='This field is required and must contain alphanumeric characters only.' ) ), 'officer_email'=array( 'email'=array( 'rule'='email', 'required'=true, 'message'='Please enter a valid email address.' ) ), 'payment_officer_name'=array( 'alphaNumeric'=array( 'rule'='alphaNumeric', 'required'=true, 'message'='This field is required and must contain alphanumeric characters only.' ) ) /* * Validation: For authorization * End */ ); When I add the last one, payment_officer_name I get the preg_match error. Is there something wrong on my approach? Help! -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Two alphaNumeric validation on model, but I get a preg_match error on line 187, [CORE/cake/libs/validation.php]
try a different key name. 'alpha_numeric'=array( 'rule'='alphaNumeric', --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Two alphaNumeric validation on model, but I get a preg_match error on line 187, [CORE/cake/libs/validation.php]
Hi Gwoo, Thanks a lot. I did not knew about that, I think I did not also see that on the manual or it is just me. Anyway, it was solved. -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) On Thu, Jan 15, 2009 at 9:23 AM, Gwoo gwoo.cake...@gmail.com wrote: try a different key name. 'alpha_numeric'=array( 'rule'='alphaNumeric', --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Two alphaNumeric validation on model, but I get a preg_match error on line 187, [CORE/cake/libs/validation.php]
I stumbled upon this error once as well. As it turns out, some versions of php - most notably the stock centos php package - are compiled without the -enable-unicode-properties. Since the alphaNumeric rule uses preg_match with the /u you get this error. You have two options, either recompile php and its dependencies from source, or write your own regex without the u switch. See http://bugs.centos.org/view.php?id=3252 Gwoo wrote: try a different key name. 'alpha_numeric'=array( 'rule'='alphaNumeric', --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Two alphaNumeric validation on model, but I get a preg_match error on line 187, [CORE/cake/libs/validation.php]
Hello, I tried two alphaNumeric validation, but I get a preg_match error. *Warning (2): preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 [CORE/cake/libs/validation.php, line 847]* My code var $validate = array( /* * Validation: For authorization * Start */ 'officer_name'=array( 'alphaNumeric'=array( 'rule'='alphaNumeric', 'required'=true, 'message'='This field is required and must contain alphanumeric characters only.' ) ), 'officer_email'=array( 'email'=array( 'rule'='email', 'required'=true, 'message'='Please enter a valid email address.' ) ), 'payment_officer_name'=array( 'alphaNumeric'=array( 'rule'='alphaNumeric', 'required'=true, 'message'='This field is required and must contain alphanumeric characters only.' ) ) /* * Validation: For authorization * End */ ); When I add the last one, payment_officer_name I get the preg_match error. Is there something wrong on my approach? Help! -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---