diff --git a/examples/for-tests/src/App.js b/examples/for-tests/src/App.js index 8c940e174..798d87edd 100644 --- a/examples/for-tests/src/App.js +++ b/examples/for-tests/src/App.js @@ -725,6 +725,7 @@ function getFormFields() { function getSignInFormFields() { let showDefaultFields = localStorage.getItem("SHOW_SIGNIN_DEFAULT_FIELDS"); + let showFieldsWithNonOptionalErrMsg = localStorage.getItem("SHOW_SIGNIN_WITH_NON_OPTIONAL_ERROR_MESSAGE"); if (showDefaultFields === "YES") { return { formFields: [ @@ -738,6 +739,15 @@ function getSignInFormFields() { }, ], }; + } else if (showFieldsWithNonOptionalErrMsg === "YES") { + return { + formFields: [ + { + id: "email", + nonOptionalErrorMsg: "Please add email", + }, + ], + }; } return {}; } diff --git a/test/with-typescript/src/App.tsx b/test/with-typescript/src/App.tsx index 1f8a4b3fa..ecc3f41ef 100644 --- a/test/with-typescript/src/App.tsx +++ b/test/with-typescript/src/App.tsx @@ -377,6 +377,7 @@ function getEmailPasswordConfigs() { id: "terms", label: "", optional: false, + nonOptionalErrorMsg: "Please check Terms and conditions", getDefaultValue: () => "true", inputComponent: (inputProps) => (