Skip to content

Commit

Permalink
validationEnabled not working (Vue3) fix #8708 (#8713)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov authored Aug 20, 2024
1 parent 96bfb67 commit 4b59f6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/survey-core/src/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3782,7 +3782,7 @@ export class SurveyModel extends SurveyElementCore
* @see checkErrorsMode
* @see hideRequiredErrors
*/
public validationEnabled: boolean = true;
@property({ defaultValue: true }) validationEnabled: boolean;
/**
* Specifies whether respondents can switch the current page even if it contains validation errors.
*
Expand Down
12 changes: 11 additions & 1 deletion testCafe/validation/standardValidators.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { frameworks, url, initSurvey, getSurveyResult } from "../helper";
import { Selector, fixture, test } from "testcafe";
import { Selector, fixture, ClientFunction, test } from "testcafe";
const title = "standardValidators";

const json = {
Expand Down Expand Up @@ -117,4 +117,14 @@ frameworks.forEach((framework) => {
},
});
});
test("validationEnabled=false", async (t) => {
const ingnoreValidation = ClientFunction(() => {
window["survey"].validationEnabled = false;
});

await ingnoreValidation();
await t.click("input[value=\"Complete\"]");
const surveyResult = await getSurveyResult();
await t.expect(surveyResult).eql({});
});
});

0 comments on commit 4b59f6e

Please sign in to comment.