diff --git a/features/admin.validation.v1/pages/validation-config-edit.tsx b/features/admin.validation.v1/pages/validation-config-edit.tsx index 5a41070182c..bdbfc907c4c 100644 --- a/features/admin.validation.v1/pages/validation-config-edit.tsx +++ b/features/admin.validation.v1/pages/validation-config-edit.tsx @@ -99,9 +99,9 @@ export const ValidationConfigEditPage: FunctionComponent state?.config?.ui?.features); - const maxPasswordLenghtLimit: number = useSelector((state: AppState) => + const maxPasswordLengthLimit: number = useSelector((state: AppState) => state?.config?.ui?.passwordPolicyConfigs?.maxPasswordAllowedLength); - const maxPasswordLenghtLimitLength: number = maxPasswordLenghtLimit.toString().length; + const maxPasswordLengthLimitLength: number = maxPasswordLengthLimit.toString().length; const [ isSubmitting, setSubmitting ] = useState(false); const [ initialFormValues, setInitialFormValues ] = useState< @@ -512,10 +512,10 @@ export const ValidationConfigEditPage: FunctionComponent maxPasswordLenghtLimit) { + } else if (Number(values.maxLength) > maxPasswordLengthLimit) { error = true; description = t( - "validation:validationError.maxLimitError", { maxPasswordValue: maxPasswordLenghtLimit } + "validation:validationError.maxLimitError", { maxPasswordValue: maxPasswordLengthLimit } ); } else if (Number(values.minLength) > Number(values.maxLength)) { error = true; @@ -743,7 +743,7 @@ export const ValidationConfigEditPage: FunctionComponent max) { return t("common:maxValidation", { max }); @@ -757,7 +757,7 @@ export const ValidationConfigEditPage: FunctionComponent