Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

验证提示信息加强 #15

Open
xuexb opened this issue Nov 13, 2017 · 2 comments
Open

验证提示信息加强 #15

xuexb opened this issue Nov 13, 2017 · 2 comments
Assignees

Comments

@xuexb
Copy link
Contributor

xuexb commented Nov 13, 2017

要基于该模块开发个 gulp 插件 ,但发现验证( validator.validate(html) )的错误返回值是一个可读性不强的描述,如:

{
    "message": "强制性标签'<link rel=\"/^(miphtml)|(canonical)|(standardhtml)$/\">'缺失或错误",
    "code": "06200101",
    "line": 0,
    "col": 0,
    "offset": 0,
    "input": ""
}

求扩展下,如:

  1. 错误对应的规则链接
  2. 错误详细信息

当然只是理想态,验证解析这块坑还是蛮多的。。。

amp 的见:

https://github.com/ampproject/amphtml/blob/d8f8886ca2fd3822a0c8a62c1d7de88f28d56d8c/validator/gulpjs/index.js#L108-L116

@wupengFEX
Copy link
Member

@xuexb 这个归类在校验提示那块做吧,先把前后端校验不一致的事做完在做这些

@harttle
Copy link
Member

harttle commented Nov 14, 2017

这个功能直接增强 dfn.json 和 /src/error/validation-error.js 就可以,比较独立。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants