Skip to content

Instantly share code, notes, and snippets.

@sasezaki
Created July 20, 2012 08:40
Show Gist options
  • Select an option

  • Save sasezaki/3149657 to your computer and use it in GitHub Desktop.

Select an option

Save sasezaki/3149657 to your computer and use it in GitHub Desktop.
just a note -ZF2 Alnum/Alpha in Filter/Validator (for zf contributors ML)
Hi, all.
Currently, ZF2 Alnum/Alpha is under Zend\I18n's.
About alphabet checking is,(アルファベットをチェックすることについて現在のZF2の実装とともにいくつか問題や議論の余地がある)
There is some issue.
- Alnum/Alpha rely on ext_intl(Locale)
- because ja/ka/ch user often think English's Alphabet is theire Alphabet.
そしてpreg's "/u" で日本語などにマッチするのを割けなければいけない。
- but zf1's Zend_Locale('auto')
(most of HTTP accept-language - web-browser!) と
AbstractLocaleでは実装が違いますよね。(Locale::getDefault() &Locale::getPrimaryLanguage($this->getLocale());)
- もちろん ctype_alphaはロケール依存なので EnglishAlpha [A-Za-z]がやっぱり必要
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment