Could we avoid hard-coding the validation layer here? I think the proper place for this might be the application_helper.rb.