Haml kannKann haml machen <input type = "text" erforderlich>
%input{:type=>"text"}
als
<input type="text">
Wonder machen, was es in haml sein sollte, so ist es in html als
<input type="text" required>
gemacht hat
Danke
Haml kannKann haml machen <input type = "text" erforderlich>
%input{:type=>"text"}
als
<input type="text">
Wonder machen, was es in haml sein sollte, so ist es in html als
<input type="text" required>
gemacht hat
Danke
Wenn die , z.B.
%input{:type=>"text", :required => true}
es wird entweder als
<input required type='text'>
gemacht werden, wenn die format
option:html4
oder :html5
ist, oder als
<input required='required' type='text' />
, wenn das Format ist :xhtml
.
Wenn der Wert falsch ist, wird es ganz entfallen:
<input type='text' />
%input{type: "text", required: true}/
oder
%input{:required => "", :type => "text"}/
Quelle: http://www.htmltohaml.com/
%input{:required => "", :type => "text"}/
%input(type="text" required=true)
ich wirklich nicht, ob dies der richtige Weg ist, aber ich habe immer 'erforderlich: true 'für diese Art von Attributen – pjam