Skip to content

Ignore validation on optional arguments #29

Closed
@aoudiamoncef

Description

@aoudiamoncef

Hi @bbakerman, @andimarek,

    findCitiesByCityCode(
        cityCode: String! @NotEmpty @NotBlank @Size(min : 5, max : 5)
        postCode: String @NotEmpty @NotBlank @Size(min : 5, max : 5) # always triggered even if the argument doesn't supplied.
		...
    ): CityPage

I think that adding a flag to directive in order to tell constraints runner to ignore optional validations if argument doesn't exist.

I'll try to add the behavior a PR. Please don't hesitate to give me feedbacks.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions