**First question**: how to validate a model relation and mark it in form when validation failed.

I have a subject model:

```
class Subject < ActiveRecord::Base     
  belongs_to :semester
  validates_presence_of :semester  
end

```

In my view (form):

```
<%= select_tag :semester, options_from_collection_for_select(@semesters,"id","name") %>

```

The `validates_presence_of` works fine. But when the validation fails (user forgot to enter semester ). The semester input is not marked in red.

**Second question**: how to validate an input field.

In my view, I also have a university input field, but model subject has no relationship with university, no field university in subject table. So how to validate it and mark it in red.

Thanks in advance.