webignition/html-validation-error-normaliser 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webignition/html-validation-error-normaliser

Composer 安装命令:

composer require webignition/html-validation-error-normaliser

包简介

Take an HTML validation error and get the normal form of it

README 文档

README

Ever found yourself staring at a list of HTML validator error messages and thinking "These 'required attribute "type" not specified' and 'required attribute "alt" not specified' errors are somewhat similar, is there a normal form for these?"

My advice: get out of the house. Take up a hobby.

Failing that, this is the package for you! Congratulations.

Usage example

<?php

use webignition\HtmlValidationErrorNormaliser\HtmlValidationErrorNormaliser;

class ExampleTest extends \PHPUnit_Framework_TestCase {    

    protected function testDemonstrateNormaliser() {
        $htmlErrorString = 'document type does not allow element "style" here';  
        $normaliser = new HtmlValidationErrorNormaliser();        
        
        $this->assertEquals(
            'document type does not allow element "%0" here',
            $normaliser->normalise($htmlErrorString)->getNormalisedError()->getNormalForm()
        );
        
        $this->assertEquals(
            array('style'),
            $normaliser->normalise($htmlErrorString)->getNormalisedError()->getParameters()
        );        
    }
    
}

统计信息

  • 总下载量: 10.48k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-07-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固