Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ooooooooooooops, I forget to commit this

  • Loading branch information...
commit ea456fd60e5ac37150ad690061590afa6134bc40 1 parent 461e81b
typester authored
Showing with 6 additions and 2 deletions.
  1. +3 −0  Changes
  2. +3 −2 lib/Catalyst/Plugin/FormValidator/Simple/Auto.pm
View
3  Changes
@@ -1,5 +1,8 @@
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
- Fixed wrong yaml format in pod
- Make yaml loading looser
View
5 lib/Catalyst/Plugin/FormValidator/Simple/Auto.pm
@@ -7,7 +7,7 @@ use Catalyst::Exception;
use UNIVERSAL::isa;
use YAML;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
__PACKAGE__->mk_accessors(qw/validator_profile/);
@@ -126,8 +126,9 @@ sub setup {
for my $rule (@$rules) {
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}{ $rule->{rule} } = $rule->{message} if defined $rule->{message};
+ $messages->{$action}{$param}{ $rule_name } = $rule->{message} if defined $rule->{message};
$rule = $rule->{rule};
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.