diff options
Diffstat (limited to 'lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm')
-rw-r--r-- | lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm b/lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm index 010ea07..e2304ef 100644 --- a/lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm +++ b/lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm @@ -81,7 +81,11 @@ role Mutable, which { implements sync_from_action => as { my ($self) = @_; return unless !$self->needs_sync; # && $self->has_attribute; - $self->message($self->model->error_for($self->attribute) || ''); + if( !$self->has_message ){ + if(my $error = $self->model->error_for($self->attribute) ){ + $self->message( $error ); + } + } }; around accept_events => sub { ('value', shift->(@_)) }; |