For example, if you want a new validator message containing the alt text used for every "img" tag then you can put the below function in a file (for example, myuserfunctions.cfg, but you can name the file whatever you want).
Code: Select all
function onStartTag_img() {
if hasAtt('alt') {
$altindex=getAttIndex('alt');
Message(1, MSG_MESSAGE, 'This <img> has alt text: "' + getAttValueEx($altindex,12) + '"', getAttValueLocation($altindex));
}}
Your new message will then be generated once the configuration is reloaded.
Please note that using user functions requires the Pro or Enterprise edition.