Field UI doesn't validate a field's default value on create

Created on 8 September 2017, over 7 years ago
Updated 13 December 2023, about 1 year ago

Problem/Motivation

When creating a field the form validation does not check field values with the default value. For an integer one can save a default value that is lower than the minimum value. The form validation should prevent this combination, but allows the field to be saved.

This error happens only when the fields are being created, on the editing form the values are validated as expected.

Validation working on editing form.

Steps to reproduce

  1. create an integer field
  2. set a default of say 6
  3. set the minimum to 10
  4. The from is saved without error

Proposed resolution

Add validation on the element returned by formElement method.

Remaining tasks

none

User interface changes

none

API changes

none

Data model changes

none

Release notes snippet

none

🐛 Bug report
Status

Closed: cannot reproduce

Version

11.0 🔥

Component
Field 

Last updated 1 day ago

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Field UX

    Usability improvements related to the Field UI

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024