Skip to content

Umbraco.Slider default value validation error on publish (unless value is selected) #21201

@stayawakesteve

Description

@stayawakesteve

Which Umbraco version are you using?

17.0.1

Bug summary

When using an Umbraco.Slider data type, trying to save & publish a node results in a validation error unless a value is set.

Specifics

The validation error states "The value [initial value],0 is not expected to contain a range".

Image

If you change the value (even if that's back to the initial value), then the validation passes and the node can be published.

This becomes a problem if the slider is being used on a tab/group that is usually left as default.

Here is a screenshot of the slider configuration I'm using (with "Enable Range" deselected)...

Image

Steps to reproduce

  • Create a new Slider data type using the following settings:
    • Minimum value: 0
    • Maximum value: 1
    • Enable range: off
    • Initial value: 0.5
    • Initial value 2: 0 (or leave blank)
    • Step increments: 0.1
  • Create a doc type containing a property that uses that data type
  • Create a new node/page with that doc type
  • Click "Save & Publish"

NOTE: I have tried using integer values and the same issue presents itself

Expected result / actual result

No validation errors on the property if left to the default (initial) value

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions