src/Utilities/Regex.php
public static function isValidHtmlAttribute($htmlAttribute)
    {
        /*
         * Not a string?
         * Nothing to do
         */
        if (!is_string($htmlAttribute)) {
            return false;
        }

        $pattern = self::getHtmlAttributePattern();

        return (bool)preg_match($pattern, $htmlAttribute);
    }
public static function isValidHtmlAttribute($htmlAttribute)
    {
        /*
         * Not a string?
         * Nothing to do
         */
        if (!is_string($htmlAttribute)) {
            return false;
        }

        $pattern = self::getHtmlAttributePattern();

        return (bool)preg_match($pattern, $htmlAttribute);
    }
public static function isValidHtmlAttribute ( $ htmlAttribute ) { /*
         * Not a string?
         * Nothing to do
         */ if ( ! is_string ( $ htmlAttribute ) ) { return false ; } $ pattern = self :: getHtmlAttributePattern ( ) ; return ( bool ) preg_match ( $ pattern , $ htmlAttribute ) ; }
Returns information if given html attribute is valid

@param string $htmlAttribute The html attribute to verify
@return bool
Returns information if given html attribute is valid