From 048bc7faf5591e8087ef69169e2a60803e98d01b Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 30 Jun 2020 13:03:51 -0500 Subject: [PATCH] Revert "simple form: enable HTML5 maxlength validations." This incorrectly added maxlength=4 to parent id fields. This reverts commit 5e23861bea7132c07b79147b7bcd716678fcba4a. --- config/initializers/simple_form.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index d95d9c4a2..2aaf05ca0 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -39,7 +39,7 @@ SimpleForm.setup do |config| # Calculates maxlength from length validations for string inputs # and/or database column lengths - b.use :maxlength + b.optional :maxlength # Calculate minlength from length validations for string inputs b.optional :minlength @@ -135,7 +135,7 @@ SimpleForm.setup do |config| # in this configuration, which is recommended due to some quirks from different browsers. # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations, # change this configuration to true. - config.browser_validations = true + config.browser_validations = false # Custom mappings for input types. This should be a hash containing a regexp # to match as key, and the input type that will be used when the field name