public static function validateSiteAccessName(string $siteaccess = null): string
    {
        // We allow empty siteaccess name in order to quit asking for more
        if (empty($siteaccess)) {
            return '';
        }

        if (!preg_match('/^[a-z][a-z0-9_]*$/', $siteaccess)) {
            throw new InvalidArgumentException('Siteaccess name is not valid.');
        }

        self::validateReservedKeywords($siteaccess);

        return $siteaccess;
    }
public static function validateSiteAccessName(string $siteaccess = null): string
    {
        // We allow empty siteaccess name in order to quit asking for more
        if (empty($siteaccess)) {
            return '';
        }

        if (!preg_match('/^[a-z][a-z0-9_]*$/', $siteaccess)) {
            throw new InvalidArgumentException('Siteaccess name is not valid.');
        }

        self::validateReservedKeywords($siteaccess);

        return $siteaccess;
    }
public static function validateSiteAccessName ( string $ siteaccess = null ) : string { // We allow empty siteaccess name in order to quit asking for more if ( empty ( $ siteaccess ) ) { return '' ; } if ( ! preg_match ( '/^[a-z][a-z0-9_]*$/' , $ siteaccess ) ) { throw new InvalidArgumentException ( 'Siteaccess name is not valid.' ) ; } self :: validateReservedKeywords ( $ siteaccess ) ; return $ siteaccess ; }
Validates siteaccess name.

@throws \InvalidArgumentException If validation did not pass
Validates siteaccess name .