I am creating a form using Slim template language and want to add the required attribute to my input.
input#first_name(required name="first_name" type="text" pattern="^[AZ][az]+$")
However, the HTML that is generated from this ends
<input id="first_name" name="first_name" pattern="^[AZ][az]+$" required="" type="text" />
And this is not what I need.
I looked through the documents, but I see no way using Slim to add the standalone html5 attribute.
Similarly, adding the data-abide attribute to the form tag (as required by the Zurb Foundation environment) fails.
form.custom(data-abide method="POST" action="/registration")
leads to
<form action="/registration" class="custom" data-abide="" method="POST">
What Zurb scripts are ignored.
What am I missing?
html5 validation forms slim-lang required-field
Dave sag
source share