Sha256: 01731ba7eb824aff714e59273c01dd9459209de1ee8e28469189065ee740ece8
Contents?: true
Size: 626 Bytes
Versions: 1080
Compression:
Stored size: 626 Bytes
Contents
<form id="example-form-validation" action="" method="get"> <%= pb_rails("phone_number_input", props: { error: "Missing phone number", id: "validation", initial_country: "af", value: "", required: true }) %> <%= pb_rails("button", props: {html_type: "submit", text: "Save Phone Number"}) %> </form> <%= javascript_tag do %> document.addEventListener('DOMContentLoaded', function () { document.querySelector('#example-form-validation').addEventListener('submit', function (e) { if (e.target.querySelectorAll('[error]:not([error=""])').length > 0) e.preventDefault(); }) }) <% end %>
Version data entries
1,080 entries across 1,080 versions & 2 rubygems