The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

SYNOPSIS

    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' ] ],
    ] );

DESCRIPTION

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] )

VALIDATION COMMANDS

HIRAGANA

check if the data is Hiragana or not.

KATAKANA

check if the data is Katakana or not.

JLENGTH

check the length of the data (behaves like 'LENGTH'). but this counts multibyte character as 1.

ZIP_JP

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' ]
    ] );
EMAIL_MOBILE_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', 'VODAFONE', or 'SOFTBANK'.

    my $result = FormValidator::Simple->check( $req => [
        email => [ ['EMAIL_MOBILE_JP', 'VODAFONE' ] ]
    ] );

LOADING OTHER PLUGINS

This module loads other plugins that has essential japanese specific validation.

See follow listed modules.

FormValidator::Simple::Plugin::Number::Phone::JP,

SEE ALSO

FormValidator::Simple

Mail::Address::MobileJp

Jcode

Unicode::RecursiveDowngrade

FormValidator::Simple::Plugin::Number::Phone::JP

http://sl.edge.jp/ (Japanese)

http://sourceforge.jp/projects/sledge

AUTHOR

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.