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

Email assert passes empty string #10357

Closed
Labels
ValidatorhasPRA Pull Request has already been submitted for this issue.
@yuri-karkh

Description

@yuri-karkh
/**     * @var string     * @ORM\Column(name="email", type="string", length=100, unique=true)     * @Assert\Email( *     message="Email is not valid", *     mode="html5" * )     */private$email;

passing empty string as an email passed validation. var_dump of the $validator->validate( $object ); is below.

object(Symfony\Component\Validator\ConstraintViolationList)#3636 (1) { ["violations":"Symfony\Component\Validator\ConstraintViolationList":private]=> array(0) { }}

Also found similar issue here:
#4244

I can confirm that if use together with NotBlank() constraint Email() constraint works as expected. So not very obvious behaviour of assertion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ValidatorhasPRA Pull Request has already been submitted for this issue.

    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