Skip to content

Support DateTimeRangeValidator #2693

Open
@bwaidelich

Description

Description

https://neos.readthedocs.io/en/stable/References/PropertyEditorReference.html#property-validation
lists all supported property validators, including DateTimeRangeValidator. But that is in fact not available.

Steps to Reproduce

  1. add a property of type DateTime to a Node Type definition (see below)
  2. use the DateTimeRangeValidator to only allow dates in the future
  3. Create an instance of the node in the Neos backend and specify a date in the past

Example:

'Some.Package:Some.Node':
  # ...
  properties:
    'date':
      type: DateTime
      validation:
        'Neos.Neos/Validation/DateTimeRangeValidator':
          earliestDate: 'now'

Expected behavior

The validator prevents the node from being created

Actual behavior

The validator is silently ignored

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions