Skip to content

LengthValidator passes test if string is empty. #7412

@alpacaaa

Description

@alpacaaa

Maybe it's just me, but what's the purpose of this check:

if (null === $value || '' === $value) {
    return;
}

why returning so early if the string is empty? If I'm checking for a minimum length, shouldn't it add a violation for empty strings too?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions