-
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.
[add] editorValidation property and related guides
- Loading branch information
1 parent
1476833
commit f331f78
Showing
5 changed files
with
56 additions
and
1 deletion.
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.2 |
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