Skip to content

Commit

Permalink
Ooooooooooooops, I forget to commit this
Browse files Browse the repository at this point in the history
  • Loading branch information
typester committed Feb 22, 2007
1 parent 461e81b commit ea456fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history for Perl module Catalyst::Plugin::FormValidator::Simple::Auto Revision history for Perl module Catalyst::Plugin::FormValidator::Simple::Auto


0.11 2007-01-02T02:56:00+09:00
- Fixed cannot handle error_messages when validation rule is array ref

0.10 2006-12-26T09:52:38+09:00 0.10 2006-12-26T09:52:38+09:00
- Fixed wrong yaml format in pod - Fixed wrong yaml format in pod
- Make yaml loading looser - Make yaml loading looser
Expand Down
5 changes: 3 additions & 2 deletions lib/Catalyst/Plugin/FormValidator/Simple/Auto.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Catalyst::Exception;
use UNIVERSAL::isa; use UNIVERSAL::isa;
use YAML; use YAML;


our $VERSION = '0.10'; our $VERSION = '0.11';


__PACKAGE__->mk_accessors(qw/validator_profile/); __PACKAGE__->mk_accessors(qw/validator_profile/);


Expand Down Expand Up @@ -126,8 +126,9 @@ sub setup {


for my $rule (@$rules) { for my $rule (@$rules) {
if ( ref $rule eq 'HASH' and defined $rule->{rule} ) { if ( ref $rule eq 'HASH' and defined $rule->{rule} ) {
my $rule_name = ref $rule->{rule} eq 'ARRAY' ? $rule->{rule}[0] : $rule->{rule};
$messages->{$action}{$param} ||= {}; $messages->{$action}{$param} ||= {};
$messages->{$action}{$param}{ $rule->{rule} } = $rule->{message} if defined $rule->{message}; $messages->{$action}{$param}{ $rule_name } = $rule->{message} if defined $rule->{message};
$rule = $rule->{rule}; $rule = $rule->{rule};
} }
} }
Expand Down

0 comments on commit ea456fd

Please sign in to comment.