fix for certain fields failing silently when they are required and left blank
groditi [Wed, 26 Nov 2008 02:07:26 +0000 (02:07 +0000)]
lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm

index 06e7e72..0acac38 100644 (file)
@@ -49,7 +49,12 @@ sub can_sync_to_action {
       }
     }
   } else {
-    return if $self->model->attribute_is_required($attr);
+    if( $self->model->attribute_is_required($attr) ){
+      if(my $error = $self->model->error_for($self->attribute) ){
+        $self->message( $error );
+      }
+      return;
+    }
   }
   return 1;
 };