Skip to content

Pattern field validation with a long error message is hidden behind field label #1654

@MitchellCash

Description

@MitchellCash

Describe the bug
When you create a pattern validation for a field and include a long error message, it flows to the width of the input field and gets hidden behind the input field label.

To Reproduce
Steps to reproduce the behavior:

  1. Create a field with pattern validation and a long error message (see my CMS configuration below)
  2. Go to CMS and the field with the pattern validation
  3. Enter a message in the field that fails validation
  4. Note that the error message can get hidden behind the field label

Expected behavior
The message does not get hidden and remains readable.

Screenshots
Netlify CMS long error message

Applicable Versions:

  • Netlify CMS version: 2.0.9
  • Git provider: GitHub
  • OS: macOS 10.13.6
  • Browser version: Firefox 61.0.2 (64-bit)

CMS configuration

- label: "Site Settings"
  name: "site_settings"
  file: "_data/site.yml"
  fields:
    - label: Site Description
      name: description
      widget: string
      pattern: ['^.{50,300}$', "For best results in Google, we recommend 50-300 characters."]
    - {label: Google Analytics Tracking ID, name: google_tracking_id, widget: string}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions