Skip to main content

editorValidation

warning

The editorValidation property was moved to the config property.

Description

Optional. A callback that returns and applies validation rules to editor fields

Usage

editorValidation?: (event: object) => string | false; 

Parameters

The callback function takes an object with the event data:

  • event - the event data object

Example

// create Event Calendar
new eventCalendar.EventCalendar("#root", {
editorValidation: event => {
if (!event.text) return "Text is required";
}
// other configuration parameters
});

Change log: The editorValidation property was added in v2.1.3