问题
Is there any javascript library which I can use to validate if ical file is valid.
Below is invalid ical file content example
BEGIN:VCALENDAR
END:VCALENDAR
Looks like https://github.com/mozilla-comm/ical.js/ is not useful. Unable to invalidate above ical file.
There is no event. This is also failing with icalendar.org/validator.html ( would like to see something like this )
回答1:
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
来源:https://stackoverflow.com/questions/57858011/how-to-validate-if-ical-icalendar-file-is-valid-using-javascript