| Data-RuledValidator-Plugin-Japanese documentation | Contained in the Data-RuledValidator-Plugin-Japanese distribution. |
Data::RuledValidator::Language::Japanese - Data::RuledValidator usign rule written in Japanese
Version 0.02
In rule file;
HIRAGANA は ひらがな KATAKANA は カタカナ # thease(_with_with_space) faile HIRAGANA_with_white_space は ひらがな KATAKANA_with_white_space は カタカナ HIRAGANA_with_white_space2 は ひらがな KATAKANA_with_white_space2 は カタカナ JP_ZIP は 郵便番号 JP_MOBILE_EMAIL は 携帯メール JP_MOBILE_EMAIL_DOCOMO は 携帯メール JP_MOBILE_EMAIL_AU は 携帯メール JP_MOBILE_EMAIL_SOFTBANK は 携帯メール JP_MOBILE_EMAIL_WILLCOM は 携帯メール JP_MOBILE_EMAIL_VODAFONE は 携帯メール JP_MOBILE_EMAIL_DOCOMO は DoCoMoメール JP_MOBILE_EMAIL_AU は AUメール JP_MOBILE_EMAIL_SOFTBANK は Softbankメール JP_MOBILE_EMAIL_VODAFONE は Vodafoneメール JP_PHONE_NUMBER は 電話番号 JAPANESE_WORDS の長さは 0, 10
This plugin provides the following Conditions.
number は 数字
For number
alphabet は 英語
For alphabet
alphanum は 英数字
For alphanum
word は 単語
For word
words は 単文
For words
family_name_kana は ひらがな
For hiragana.
family_name_kana は かたかな
For katakana
zipcode は 電話番号
For Japanese phone number.
zipcode is 郵便場号
For Japanese zip code. ###-####.
mobile_mail is 携帯メール
For Japanese mobile mail address. It allow many kinds of mobile email address.
If you want to check specified kinds of mail address, use the following;
This plugin provides the following Operator.
hiragana は 平仮名
This is same as normal operator is.
jp_words の長さは 0, 10
If the length of jp_words is from 0 to 10, it is valid. The first number is min length, and the second number is max length.
You can write only one value.
jp_words の長さは 5
This means length of jp_words lesser than 6.
Ktat, <ktat at cpan.org>
Please report any bugs or feature requests to
bug-data-ruledvalidator-plugin-japanese at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-RuledValidator-Language-Japanese.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Data::RuledValidator::Plugin::Japanese
You can also look for information at:
http://annocpan.org/dist/Data-RuledValidator-Language-Japanese
http://cpanratings.perl.org/d/Data-RuledValidator-Language-Japanese
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-RuledValidator-Language-Japanese
http://search.cpan.org/dist/Data-RuledValidator-Language-Japanese
Copyright 2007 Ktat, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Data-RuledValidator-Plugin-Japanese documentation | Contained in the Data-RuledValidator-Plugin-Japanese distribution. |
package Data::RuledValidator::Language::Japanese; use strict; use Data::RuledValidator; my %operator = ( 'ã¯' => 'is' , 'ã®é·ãã¯' => 'length_jp', ); my %condition = ( 'ã²ãããª' => 'hiragana' , '平仮å' => 'hiragana' , 'ã«ã¿ã«ã' => 'katakana' , 'ããããª' => 'katakana' , 'çä»®å' => 'katakana' , 'éµä¾¿çªå·' => 'jp_zip' , 'é»è©±çªå·' => 'jp_phone_number' , 'æºå¸¯ã¡ã¼ã«' => 'jp_mobile_email' , 'DoCoMoã¡ã¼ã«' => 'jp_imode_email' , 'AUã¡ã¼ã«' => 'jp_ezweb_email' , 'Softbankã¡ã¼ã«' => 'jp_softbank_email' , 'Vodafoneã¡ã¼ã«' => 'jp_vodafone_email' , 'æ°å' => 'number' , 'è±èª' => 'alpha' , 'è±æ°å' => 'alphanum' , 'åèª' => 'word' , 'åæ' => 'words' , 'å¿ é ' => 'not_null' , ); for my $jp_name (keys %operator){ Data::RuledValidator->__operator ( $jp_name => Data::RuledValidator->__operator($operator{$jp_name}) ); } for my $jp_name (keys %condition){ Data::RuledValidator->__condition ( $jp_name => Data::RuledValidator->__condition($condition{$jp_name}) ); } 1;
our $VERSION = '0.02';
1; # End of Data::RuledValidator::Language::Japanese