Skip to content

Commit

Permalink
Update Data Validation
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanTsukanov committed Nov 29, 2023
1 parent d626e48 commit 6d35c9b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/data-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,14 @@ const surveyJson = {

## Switch Between Pages with Validation Errors

By default, a respondent cannot leave a page that contains validation errors. If you want to let a respondent switch between pages regardless of whether they have validation errors or not, enable the [`validationAllowSwitchPages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationAllowSwitchPages) property.
By default, a respondent cannot leave a page that contains validation errors. If you want to let a respondent switch between pages regardless of whether they have validation errors or not, enable the [`validationAllowSwitchPages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationAllowSwitchPages) property as follows:

```js
const surveyJson = {
"validationAllowSwitchPages": true,
"elements": [
// ...
]
}
import { Model, NumericValidator } from "survey-core";

const surveyJson = { ... }
const survey = new Model(surveyJson);
survey.validationAllowSwitchPages = true;
```

## See Also
Expand Down

0 comments on commit 6d35c9b

Please sign in to comment.