Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] IsbnValidator is not conform to the documentation #10386

Closed
Labels
@konandrum

Description

@konandrum

This is what is writing in the documentation:

isbn10¶
type: boolean
If this required option is set to true the constraint will check if the code is a valid ISBN-10 code.

isbn13¶
type: boolean
If this required option is set to true the constraint will check if the code is a valid ISBN-13 code.

Here is the code:

if (10 === $valueLength && null !== $constraint->isbn10) {
...
} elseif (13 === $valueLength && null !== $constraint->isbn13) {
...
} else {
...
}

The problem is when I set to false the isbn10 and to true the isbn13 parameters, I get the bothIsbnMessage instead of the isbn13Message.

I suggest to change the code like this:

if (10 === $valueLength && $constraint->isbn10) {
...
} elseif (13 === $valueLength && $constraint->isbn13) {
...
} else {
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp