Jump to content

PHP, JS, and CSS Validation


j.silver
 Share

Recommended Posts

Validation of a block of code to see if it is written properly. You copy your block of code and paste it inside the validator, which comes up with a statement that the code is good or lists suggestions of improving the code to be in line with standards.

Link to comment
Share on other sites

HTML validation only ensures that the HTML has proper syntax. If the PHP syntax is incorrect you'll get a syntax error. If Javascript syntax is incorrect you get a Javascript error. If MySQL syntax is incorrect you'll get an SQL error.

 

HTML needs validation because, unlike those other languages, browsers forgive mistakes and try to interpret wrong HTML as best as they can. PHP, Javascript and MySQL won't function properly if the syntax is incorrect.

Link to comment
Share on other sites

Paid editors are usually equipped with some basic validation capabilities, but I am using Notepad++ in which I am not seeing such capabilities. Is there a setting change in Notepad++ that might make it more capable, or is there a better free editor?

Link to comment
Share on other sites

There are also build tools like Grunt and Gulp that have plugins for linting JS / CSS / HTML files.

 

note: these are tools built on top of Node.js

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...