forms - How to set HTML5 attributes like 'required' using a Slim template -


i m laying out form using slim template language , want add required attribute input.

input#first_name(required name="first_name" type="text" pattern="^[a-z][a-z]+$") 

however html generated ends being

 <input id="first_name" name="first_name" pattern="^[a-z][a-z]+$" required="" type="text" /> 

and that's not need.

i've gone through docs can't see way slim add standalone html5 attribute.

likewise adding data-abide attribute form tag (as required zurb foundation framework) fails.

form.custom(data-abide method="post" action="/registration") 

leads to

<form action="/registration" class="custom" data-abide="" method="post"> 

which zurb scripts ignore.

what missing?

in *.html.slim file do:

input#first_name required="" name="first_name" type="text" pattern="^[a-z][a-z]+$" 

note empty attribute syntax:

<input required> 

is equivalent to:

<input required=""> 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -