I'm trying to make a script that contains a function in the pug engine, but I can not get it to call when the user submits the form, can anyone help me? Here is the code:
html
head
title= message
script.
funtion validator(){
alert("teste");
}
body
h1= message
form(method ="post", action="/cadastrar/marca")
input(type="text", name="descricao", id="descricao")
input(type="submit", onclick="return validator()")