ruby on rails - Add XSLT validation on XSLT File Upload -


i have rails application paperclip file upload used upload xslt file. looking ways validate xslt file before uploading. can validate content_type using paperclip

  validates_attachment_content_type :xslt, content_type: "application/xslt+xml", message: 'invalid content type. please upload valid xslt file' 

is there way validate xslt file syntax before saving it?


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -