
FormValidator::Simple::Plugin::Japanese - Japanese specific validation.

use FormValidator::Simple qw/Japanese/;
my $result = FormValidator::Simple->check( $req => [
zip => [ 'NOT_BLANK', 'ZIP_JP' ],
name => [ 'NOT_BLANK', [ 'JLENGTH', 5 10 ] ],
kana_name => [ 'NOT_BLANK', 'KATAKANA', [ 'JLENGTH', 5, 10 ] ],
email => [ [ 'EMAIL_MOBILE_JP', 'IMODE' ] ],
] );

This modules adds some Japanese specific validation commands to FormValidator::Simple. Most of validation code is borrowed from Sledge::Plugin::Validator::japanese.
( Sledge is a MVC web application framework: http://sl.edge.jp/ [Japanese] )

check if the data is Hiragana or not.
check if the data is Katakana or not.
check the length of the data (behaves like 'LENGTH'). but this counts multibyte character as 1.
check Japanese zip code. [ seven digit ( and - ) for example 1111111, 111-1111 ]
my $result = FormValidator::Simple->check( $req => [
zip => [ 'ZIP_JP' ],
] );
or you can validate with two params, [ one is three digit, another is four. ]
my $result = FormValidator::Simple->check( $req => [
{ zip => [qw/zip1 zip2/] } => [ 'ZIP_JP' ]
] );
check with Mail::Address::MobileJp.
my $result = FormValidator::Simple->check( $req => [
email => [ 'EMAIL_MOBILE_JP' ]
] );
you can also check if it's 'IMODE', 'EZWEB', or 'VODAFONE'.
my $result = FormValidator::Simple->check( $req => [
email => [ ['EMAIL_MOBILE_JP', 'VODAFONE' ] ]
] );

This module loads other plugins that has essential japanese specific validation.
See follow listed modules.
FormValidator::Simple::Plugin::Number::Phone::JP,

FormValidator::Simple::Plugin::Number::Phone::JP
http://sl.edge.jp/ (Japanese)
http://sourceforge.jp/projects/sledge

Lyo Kato <lyo.kato@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.