Skip to content

Range constraint on date fields is always invalid #126

Description

@soerenbernstein

I have a symfony form which includes a DateType for a birthday field of my entity. The entity has an annotated Range constraint:

/**
  * @Assert\Range(
  *     max = "today",
  *     min = "first day of this month - 14 years UTC",
  */
  var $birthday;

This will work in symfony, but during client side validation, any date entered is invalid. Am I doing something wrong, or is this not supported?

Metadata

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