Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

submitted じゃないと error message をとれないのはおかしいので修正。後方互換がなくなるので plain のみ変更

  • Loading branch information...
commit 7a1e3344947d347d74ce98292eb6ba29d1893861 1 parent 4f491b9
@typester authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Ark/Form.pm
View
5 lib/Ark/Form.pm
@@ -261,7 +261,7 @@ sub localize {
sub error_message_plain {
my ($self, $name) = @_;
- return unless $self->submitted && $self->is_error($name);
+ return unless $self->is_error($name);
my ($error) =
grep { $_->[0] eq $name } @{ $self->_shakan->_fvl->{_error_ary} || [] }
@@ -272,7 +272,7 @@ sub error_message_plain {
sub error_messages_plain {
my ($self, $name) = @_;
- return unless $self->submitted && $self->is_error($name);
+ return unless $self->is_error($name);
my (@errors) =
grep { $_->[0] eq $name } @{ $self->_shakan->_fvl->{_error_ary} || [] }
@@ -319,6 +319,7 @@ sub _create_error_message {
sub error_message {
my ($self, $name) = @_;
+ return unless $self->submitted;
sprintf($self->message_format, $self->error_message_plain($name) || return);
}
Please sign in to comment.
Something went wrong with that request. Please try again.