Skip to content

Clarify that browser_validations default differs between gem and generator#1871

Open
vitor-de-castro wants to merge 1 commit into
heartcombo:mainfrom
vitor-de-castro:clarify-browser-validations-default
Open

Clarify that browser_validations default differs between gem and generator#1871
vitor-de-castro wants to merge 1 commit into
heartcombo:mainfrom
vitor-de-castro:clarify-browser-validations-default

Conversation

@vitor-de-castro

Copy link
Copy Markdown

What

The README states SimpleForm.browser_validations defaults to true,
but the install generator explicitly sets it to false in the
generated initializer.

Why

This is intentional behaviour, documented in an inline comment in the
generator template, due to inconsistent native HTML5 validation
across browsers. However this distinction was not mentioned anywhere
in the README, leading users to reasonably expect true after
running rails generate simple_form:install, when in fact they get
false.

Changes

Adds a short note in the README clarifying the difference between
the gem-level default and what the generator sets, and how to
restore the gem-level default if desired.

Fixes #1746

…rator

The README states SimpleForm.browser_validations defaults to true,
but the install generator explicitly sets it to false in the
generated initializer. This is intentional (documented in the
generator template's inline comment) due to inconsistent native
HTML5 validation behavior across browsers, but this distinction
was not mentioned anywhere in the README, leading to confusion.

Adds a note clarifying the difference and how to restore the
gem-level default if desired.

Fixes heartcombo#1746
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

README.md says browser_validations = true by default, but generator makes it false

1 participant