diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js index 6203cabdc..211d91ef8 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js @@ -155,7 +155,7 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { const setUserNewPassword = (value) => { setNewPassword(value); - if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(value)) { + if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,10})$/i).test(value)) { setErrors({ ...errors, newPassword: { type: "pattern", message: "CORE_COMMON_PROFILE_PASSWORD_INVALID" } }); } else { setErrors({ ...errors, newPassword: null }); @@ -165,7 +165,7 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { const setUserConfirmPassword = (value) => { setConfirmPassword(value); - if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(value)) { + if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,10})$/i).test(value)) { setErrors({ ...errors, confirmPassword: { type: "pattern", message: "CORE_COMMON_PROFILE_PASSWORD_INVALID" } }); } else { setErrors({ ...errors, confirmPassword: null }); @@ -216,7 +216,7 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { throw JSON.stringify({ type: "error", message: t("CORE_COMMON_PROFILE_PASSWORD_INVALID") }); } - if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(newPassword) && !new RegExp(/^([a-zA-Z0-9@#$%]{8,15})$/i).test(confirmPassword)) { + if (!new RegExp(/^([a-zA-Z0-9@#$%]{8,10})$/i).test(newPassword) && !new RegExp(/^([a-zA-Z0-9@#$%]{8,10})$/i).test(confirmPassword)) { throw JSON.stringify({ type: "error", message: t("CORE_COMMON_PROFILE_PASSWORD_INVALID") }); } } @@ -606,6 +606,8 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { pattern="^([a-zA-Z0-9@#$%])+$" onChange={(e) => setUserCurrentPassword(e.target.value)} disable={editScreen} + maxlength={10} + /> {errors?.currentPassword && {t(errors?.currentPassword?.message)}} @@ -625,6 +627,8 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { pattern="^([a-zA-Z0-9@#$%])+$" onChange={(e) => setUserNewPassword(e.target.value)} disable={editScreen} + maxlength={10} + /> {errors?.newPassword && {t(errors?.newPassword?.message)}} @@ -644,6 +648,8 @@ const UserProfile = ({ stateCode, userType, cityDetails }) => { pattern="^([a-zA-Z0-9@#$%])+$" onChange={(e) => setUserConfirmPassword(e.target.value)} disable={editScreen} + maxlength={10} + /> {errors?.confirmPassword && {t(errors?.confirmPassword?.message)}} diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/changePassword.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/changePassword.js index f525f93b2..e2afaf06b 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/changePassword.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/changePassword.js @@ -77,14 +77,6 @@ const ChangePasswordComponent = ({ config: propsConfig, t }) => { const config = [ { body: [ - // { - // label: t(username.label), - // type: username.type, - // populators: { - // name: username.name, - // }, - // isMandatory: true, - // }, { label: t(password.label), type: password.type, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/config.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/config.js index 487112dfd..67f19dd91 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/config.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/config.js @@ -5,12 +5,6 @@ export const config = [ submitButtonLabel: "CORE_COMMON_CHANGE_PASSWORD", }, inputs: [ - { - label: "CORE_LOGIN_USERNAME", - type: "text", - name: "userName", - error: "ERR_HRMS_INVALID_USERNAME", - }, { label: "CORE_LOGIN_NEW_PASSWORD", type: "password",