如何使用javascript验证ical(iCalendar)文件是否有效? [英] How to validate if ical ( iCalendar ) file is valid using javascript?
问题描述
有没有可用于验证ical文件是否有效的javascript库.
Is there any javascript library which I can use to validate if ical file is valid.
以下是无效的ical文件内容示例
Below is invalid ical file content example
BEGIN:VCALENDAR
END:VCALENDAR
类似 https://github.com/mozilla-comm/ical.js/没有用.无法使上述ical文件无效.
Looks like https://github.com/mozilla-comm/ical.js/ is not useful. Unable to invalidate above ical file.
没有事件.icalendar.org/validator.html也失败了(希望看到类似的东西)
There is no event. This is also failing with icalendar.org/validator.html ( would like to see something like this )
推荐答案
您可以尝试通过 https://icalendar.org/validator.html 他们可以选择通过网址
You can try to use server-side validation by https://icalendar.org/validator.html They have an option to show errors in JSON format from ical feed from URL
https://icalendar.org/validator.html?url=https://example.com/somecalendar_feed&json=1
这篇关于如何使用javascript验证ical(iCalendar)文件是否有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!