-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move validation errors for check boxes and radio buttons into last `d…
…iv.form-check`. (#448) * Test from 419-check-radio-errors. * Tests from 419-check-radio-errors-b and 419-check-radio-errors-c. * Plain check_box working. * radio_button error_message. * Collections radios and checks working. * Correct options to Rails helper. * Upgrade doc first draft. * Fix tests and code for file and date/time selects. * Update CHANGELOG. * Remove commented-out test This test case was removed as it was something that's too difficult to support with Bootstrap 4. test 'form_group renders the "error" class and message corrrectly when object is invalid' do @user.email = nil assert @user.invalid? output = @builder.form_group :email do %{<p class="form-control-static">Bar</p>}.html_safe end expected = <<-HTML.strip_heredoc <div class="form-group"> <p class="form-control-static">Bar</p> <div class="invalid-feedback">can't be blank, is too short (minimum is 5 characters)</div> </div> HTML assert_equivalent_xml expected, output end In its place, we've recommended a workaround in the UPGRADE-4.0 doc, which is to output the error message manually. This workaround has a corresponding test to verify its correctness. * Error message must be sibling of input
- Loading branch information
Showing
9 changed files
with
362 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.