NAME

Egg::Plugin::FormValidator::Simple - FormValidator::Simple for Egg.

SYNOPSIS

package MYPROJECT;
use strict;
use Egg qw/FormValidator::Simple/;

Example of configuration.

plugin_validator=> {
  plugins=> [qw/Japanise/],
  messages=> {
    origin_lavel=> {
      nickname=> {
        DEFAULT=> 'Please input nickname.',
        LENGTH => 'nickname input is long.',
        ...
        },
      email=> {
        DEFAULT=> 'Please input email.',
        EMAIL  => 'Format of email is mistaken.',
        ...
        },
      ...
      },
    },
  message_format=> .... message format hear.
  },

Example of code.

$e->form(
  nickname=> [qw/NOT_BLANK .../, [qw/LENGTH 3 30/]],
  email   => [qw/NOT_BLANK EMAIL/],
  );

if ($e->has_error) {
  for my $message (@{$e->form->messages('origin_lavel')}) {
    print $message;
  }
} else {
  ... success code.
}

* Please see FormValidator::Simple of use about more detailed information.

DESCRIPTION

This is a module to do the input check on the form by using FormValidator::Simple.

Please install FormValidator::Simple before using.

perl -MCPAN -e 'install FormValidator::Simple'

* The installation was effective well for Windows by doing nmake after it had obtained it why. ?

# The package is obtained.
http://search.cpan.org/dist/FormValidator-Simple/

# It defrosts and 'nmake' is done when downloading it.

When this code was made, Catalyst::Plugin::FormValidator::Simple was imitated.

CONFIGURATION

plugins

The plugin for FormValidator::Simple is enumerated by the ARRAY reference.

options

The option of FormValidator::Simple is defined.

messages

The alias of the error message can be defined.

message_format

The output format of the error message can be defined.

METHODS

$e->form([PARAMETER])

The check on form data is executed.

SEE ALSO

FormValidator::Simple, Catalyst::Plugin::FormValidator::Simple, Egg::Release,

AUTHOR

Masatoshi Mizuno <lushe@cpan.org>

COPYRIGHT

Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.