--- lib/A3C/Model/StrixInstanceSelection.pm 2008/06/16 22:17:06 185 +++ lib/A3C/Model/StrixInstanceSelection.pm 2008/06/16 22:56:14 186 @@ -12,6 +12,7 @@ label is _('Instance identifier'), is mandatory, type is 'text', + is ajax_validates, refers_to A3C::Model::StrixInstance by 'instance'; column by_user => @@ -33,8 +34,15 @@ my $strix = A3C::Model::StrixInstanceSelection->new; $strix->load_by_cols( instance => $instance ); - return ( 0, _('Instance %1 is allready selected', $instance) ) if $strix->id; - return 1; + if ( $strix->id ) { + return ( 0, _('Instance %1 allready selected', $instance) ); + } else { + eval { + Strix->dbh( $instance ); + }; + return 1 unless $@; + return ( 0, $@ ); + } } sub current_user_can {