I agree, and I do this myself in dual-language (English/French) localised sites.
However, I was simply attempting to illustrate to the original poster that the 'alphanumeric' rule does exactly what it is suppsed to do, as per the definition of 'alphanumeric'. The regex for multibyte alphanumeric characters is (I believe) simple enough, but you need to ensure that the characters are UTF-8 encoded. If you don't know the encoding, then I have no idea how you would be able to perform the validation rule (and if this is something that someone has done before, I will be forever grateful if you explain how to do it), and hence my comment on the 'impossibility' of a universal alphanumeric validation rule. Cake is a wonderful tool, but sometimes you need to get your hands dirty. If my regex-fu is still up to par, I believe /[\w\pL]/u to be the correct multibyte regex to match alphanumeric characters. If this is false, please correct me. -Joel. On May 30, 2:13 pm, Adriano Varoli Piazza <[EMAIL PROTECTED]> wrote: > On May 30, 2:25 pm, Joel Perras <[EMAIL PROTECTED]> wrote: > > >http://en.wikipedia.org/wiki/Alphanumeric > > > In case you don't click the above link: > > > "Alphanumeric is a is portmanteau of alphabetic and numeric and is > > used to describe the collection of Latin letters and Arabic digits > > used by much of western society. There are either 36 (single case) or > > 62 (case-sensitive) alphanumeric characters. The alphanumeric > > character set consists of the numbers 0 to 9 and letters A to Z." > > > I'd love for Cake to have a built-in validation rule that would > > validate all Latin/Cyrillic/Asian/Arabic alphanumeric characters, but > > that's pretty much impossible. > > Validating them all at the same time might be, but localizing a > website to cater to different alphabets or languages is doable. When I > have to validate against Spanish rules, I don't cower in fear of kanji > or arabic, I simply validate alphanumeric characters for my language, > such as á, é, ñ, etc. After all, \w in Perl (or the equivalent regex > entity for a word) is localized, IIRC. > > Saludos > Adriano --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---