# File lib/smart_proxy_openscap/openscap_content_parser.rb, line 22 def validate errors = [] allowed_type = 'SCAP Source Datastream' if @source.type != allowed_type errors << "Uploaded file is not #{allowed_type}" end begin @source.validate! rescue OpenSCAP::OpenSCAPError errors << "Invalid SCAP file type" end {:errors => errors}.to_json end