ruby on rails - Abide Required tag in simple-form without "data-" -


with foundation 6 , abide want have tag in simple-form form:

<input class="string optional" pattern="text" type="text" name="service[street_address]" id="service_street_address" required> 

with required attribute.

i tried this:

<%= service.input_field :street_address, data: {:required => ''}, pattern:"text" %> 

but the required tag becomes data-required , breaks abide validation:

<input data-required="" class="string optional" pattern="text" type="text" name="service[street_address]" id="service_street_address"> 

is there way have required or required="" ?

if required: true doesn't work, try:

<%= service.text_field :postal_box, required: "required", pattern: "text" %>


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -