codelife
codelife copied to clipboard
add extra base rule for head/body as siblings (and not children of eachother)
This relates to the HTML code validation rules that get run after a user submits their code. Currently there is no rule to check that the <head> and <body> elements appear side-by-side as children of the <html> tag instead of nested within each other.
All of the validation rules are defined in this file: https://github.com/CodeLifeOrg/codelife/blob/master/app/utils/codeValidation.js
And can be added to the base rules (required by default for any user submitted HTML code) here: https://github.com/CodeLifeOrg/codelife/blob/7d9cb41398255b4edd318eb071b334c63b38a16e/app/components/CodeEditor/CodeEditor.jsx#L230-L265