fixed mutable role for field's vp
wreis [Wed, 30 Jul 2008 14:42:44 +0000 (14:42 +0000)]
lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm

index b73114c..614a36c 100644 (file)
@@ -43,7 +43,11 @@ sub can_sync_to_action {
       }
     }
   } else {
-    return if $attr->is_required;
+    if ( $self->model->attribute_is_required($attr) ) {
+      my $tc = $attr->type_constraint;
+      $self->message($tc->get_message) if $tc->has_message;
+      return;
+    }
   }
   return 1;
 };