Skip to content

[Validator] WeekType validator #34942

@lsv

Description

@lsv

Description
Validates the new WeekType form type, so its not possible to have 2019-55 with "single_text".

Maybe also add a min_year, max_year, min_week, max_week to the validator

Example

@Assert\WeekString(
    min_year = 2019
    max_year = 2019
    max_week = 10
)

With this it should only be possible to set year to 2019 and week either 1, 2, 3...,9, with the format of YYYY-WW

@Assert\WeekArray

Only allows ["year" => xxxx, "week" => yy]

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