Extending native html5 rules
I would like to extend the pre defined html5-rules, and this is the best way today to do it: (add attribues rules)
const html5 = require('html-validate/elements/html5.json');
input: {
inherit: 'input',
attributes: {
...html5.input.attributes,
name: [/my-cool-regex/],
},
},
So even if inherit
is defined, i also need to add the current list for all the fields that i want to modify. Would be alot easier if inherit
was the only thing that i had to write to do this. But them, how to handle deletion of attributes?