Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6811857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:22:45+00:00 2026-05-26T20:22:45+00:00

The application I’m working on allows users to upload HTML templates with CSS, which

  • 0

The application I’m working on allows users to upload HTML templates with CSS, which the app then processes out for various tasks. The upload process works fine, but I’m trying to find a way to validate the HTML and CSS files that get uploaded. I’ve found several gems and plugins that are meant to be integrated into unit tests (such as https://github.com/realityforge/rails-assert-valid-asset), but I’m looking for something I can run the files against on upload (in a production environment).

Does something like this exist?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:22:46+00:00Added an answer on May 26, 2026 at 8:22 pm

    You should be able to use the World Wide Web Consortium’s online validation service through the w3c_validators gem: https://github.com/alexdunae/w3c_validators .

    Here’s an example from the Readme for CSS:

    require 'w3c_validators'
    
    include W3CValidators
    
    @validator = CSSValidator.new
    
    results = @validator.validate_text('body { margin: 0px; }')
    
    if results.errors.length > 0
      results.errors.each do |err|
        puts err.to_s
      end
    else
      puts 'Valid!'
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application allows users to upload javascript, CSS, and HTML files. We need a
Application : I am working on one mid-large size application which will be used
Application frameworks such as DotNetNuke, Eclipse, Websphere and so forth are available today which
Application: WPF Application consisting of a textbox on top and a listbox below Users
my application use 10 threads that to read a lot of html file.similar the
Application level events and processes in Excel are restricted to a single instance of
APPLICATION DESCRIPTION : I am a new iPhone developer. I am working on an
APPLICATION and ENVIRONMENT Java EE / JSF2.0 / JPA enterprise application, which contains a
application.rb config.time_zone = 'Athens' I want to list entries which are published between any
Application Settings.bundle contains a version number , which is automatically generated during build. From

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.