Skip to content

Public Domain Suffix Validation Exception Message Correction #1539

@PetalBranch

Description

@PetalBranch

The negative mode message (MODE_NEGATIVE) in line 25 has been updated to {{name}} must not be a public domain suffix to reflect the validation logic’s negation requirement. This ensures proper error feedback when a value is invalid due to being a public domain suffix.

self::STANDARD => '{{name}} must be a public domain suffix',

<?php

/*
 * Copyright (c) Alexandre Gomes Gaigalas <[email protected]>
 * SPDX-License-Identifier: MIT
 */

declare(strict_types=1);

namespace Respect\Validation\Exceptions;

/**
 * @author Henrique Moody <[email protected]>
 */
class PublicDomainSuffixException extends ValidationException
{
    /**
     * {@inheritDoc}
     */
    protected $defaultTemplates = [
        self::MODE_DEFAULT => [
            self::STANDARD => '{{name}} must be a public domain suffix',
        ],
        self::MODE_NEGATIVE => [
            self::STANDARD => '{{name}} must not be a public domain suffix', // Modified line 25
        ],
    ];
}

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