Description

Validates hostname

Syntax

// src/Entity/ServerSettings.php
namespace App\Entity;
 
use Symfony\Component\Validator\Constraints as Assert;
 
class ServerSettings
{
    /**
     * @Assert\Hostname(message="The server name must be a valid hostname.")
     */
    protected $name;
}