Commit b51d4466 by Mai Hoang Thai Ha

fixed format accept

parent 5e22e2cf
class ApplyJob < ApplicationRecord class ApplyJob < ApplicationRecord
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
ACCEPT_CONTENT_TYPE = %w[application/pdf application/msword application/zip application/xls application/xlsx].freeze ACCEPT_CONTENT_TYPE = 'application/pdf, application/msword, application/zip, application/xls, application/xlsx'.freeze
belongs_to :job belongs_to :job
belongs_to :user belongs_to :user
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
= f.file_field :cv, accept: ApplyJob::ACCEPT_CONTENT_TYPE, class: 'form-control' = f.file_field :cv, accept: ApplyJob::ACCEPT_CONTENT_TYPE, class: 'form-control'
= f.submit 'Confirm', class: 'btn btn-primary w-25 my-4 btn-height' = f.submit 'Confirm', class: 'btn btn-primary w-25 my-4 btn-height'
= render 'validate_form' / = render 'validate_form'
= javascript_pack_tag 'validation' = javascript_pack_tag 'validation'
javascript: javascript:
Validator({ Validator({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment