-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from DHTMLX/next
Next
- Loading branch information
Showing
9 changed files
with
260 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
docs/api/config/js_eventcalendar_editorvalidation_config.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
sidebar_label: editorValidation | ||
title: mode Config | ||
description: You can learn about the editorValidation config in the documentation of the DHTMLX JavaScript Event Calendar library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Event Calendar. | ||
--- | ||
|
||
# mode | ||
|
||
### Description | ||
|
||
@short: Optional. A callback that returns and applies validation rules to editor fields | ||
|
||
### Usage | ||
|
||
~~~jsx {} | ||
editorValidation?: (event: object) => string | false; | ||
~~~ | ||
|
||
### Parameters | ||
|
||
The callback function takes an object with the event data: | ||
|
||
- `event` - the event data object | ||
|
||
### Example | ||
|
||
~~~jsx {3-5} | ||
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.