Topic: Validate after cheked checkbox

Hello!
Please help!

I've got table with addresses named Address

In this tabe STI:

class HomeAddress    < Address
end

class MailAddress    < Address
end

class SecondaryAddress  < Address
end

In views edit.html.erb

presents checkboxes! If checkbox is checked open hiden form (by JavaScript)

I need:
When I check checkbox and opened form, fields in form must check Validates

validates :zipcode, numericality: true

, else nothing to do!