Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #25540
Closed
Open
Issue created Feb 03, 2018 by Administrator@rootContributor

form-check-inline and invalid-feedback rendering issue

Created by: GBH

This is a valid way to render inline inputs. In order to show invalid feedback we need to cram it on the last container there or it will be display: none. Obviously it renders like hell. (can't get JS bin to work, sorry)

<div class="form-check form-check-inline">
  <input class="form-check-input is-invalid" type="checkbox" value="x" name="user[test][]" id="user_test_x" />
  <label class="form-check-label" for="user_test_x">X</label>
</div>
<div class="form-check form-check-inline">
  <input class="form-check-input is-invalid" type="checkbox" value="y" name="user[test][]" id="user_test_y" />
  <label class="form-check-label" for="user_test_y">Y</label>
  <div class="invalid-feedback">is invalid</div>
</div>

I don't have a solution, just providing an example.

For server-side validations it's easy to override css and add display: block for invalid-feedback.

Demo: https://codepen.io/anon/pen/vdGNWo

Assignee
Assign to
Time tracking