@grigri : I understand your comment. Of course, a regex is not a
solution for all alphabets. I thought about "locale" purpose, because
in my case, the regex is simply "/[a-z0-9]$/i" and the accented
characters are validated by Cake!

@Samuel : as soons as I have time for that, I will search a solution
and publish it on trac, of course.

On 15 fév, 18:03, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> perhaps someone familiar with these non-americacentric languanges
> could suggest in a trac ticket a regex query that would include these
> other characters
>
> The check now is for
> $_this->regex = '/[^\\dA-Z]/i';
>
> so suggest the fix to help them, I'm not familiar enough with the
> other languages to be a lot of help
>
> Sam D
>
>
>
> On Fri, Feb 15, 2008 at 9:33 AM, grigri <[EMAIL PROTECTED]> wrote:
>
> >  > But it's anormal for "accented characters" which often exist in French
> >  > or European language and are real letters...
>
> >  "real letters"? By that rationale, all other alphabets should validate
> >  too: from greek to cyrillic and hiragana. Can you imagine the regexp
> >  for that?. I understand your frustration, but "alphanumeric" means
> >  just the base 26 latin letters and 10 arabic numerals, nothing else.
> >  It doesn't mean "valid text in any language known to man". Just how
> >  useful this validation method is remains to be seen...
>
> >  On Feb 15, 4:26 pm,avairet<[EMAIL PROTECTED]> wrote:
> >  > OK! Thank's.
> >  > I've found myself and I've wrote a regular expression!
>
> >  > It's normal "alphaNumeric validation criteria" doesn't work for "blank
> >  > character" which are not "letter" or "number", I'm stupid!
> >  > But it's anormal for "accented characters" which often exist in French
> >  > or European language and are real letters...
>
> >  > BR
>
> >  > Aurélien
>
> >  > On 15 fév, 17:12, Adam Royle <[EMAIL PROTECTED]> wrote:
>
> >  > > This has been reported by others before, but the cake team has said
> >  > > this is the expected functionality. If you're really worried about
> >  > > validating this data then validate the length of the data, otherwise
> >  > > write a custom regex to handle your requirements.
>
> >  > > Cheers,
> >  > > Adam
>
> >  > > On Feb 16, 1:56 am,avairet<[EMAIL PROTECTED]> wrote:
>
> >  > > > Hi,
>
> >  > > > Model : "nature" (id int auto-increment PK / label varchar (50) )
>
> >  > > > var $validate = array(
> >  > > >    'label' => array('alphaNumeric')
> >  > > > );
>
> >  > > > Create basic functions in NaturesController (view, add, edit)
>
> >  > > > I launch : "myapp/natures/add"
>
> >  > > > Add new Nature with label "Article" work fine. Data is saved
> >  > > > correctly.
> >  > > > But add label with special characters, like "é" or "-" or blank:
> >  > > > validation failed!
> >  > > > Error message is: 'The Nature could not be saved. Please, try again.
> >  > > > This field cannot be left blank'!?
> >  > > > I've tested with the 1.2.x.x Nightly builds and 1.2.0.6311 and
> >  > > > 1.2.0.5875 releases and the problem remains.
>
> >  > > > Have you noticed that?
>
> >  > > >Avairet
>
> --
> --
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot
>
> http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/http://blog.samdevore.com/cakephp-pages/i-cant-bake/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to