Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7009c82571
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
packages/contact-center/cc-components/src/components/StationLogin/station-login.utils.tsx
Outdated
Show resolved
Hide resolved
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6dfb003fc2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const validateDialNumber = (input: string, setDNErrorText: (error: string) => void, logger): boolean => { | ||
| try { | ||
| const regexForDn = new RegExp(dialNumberRegex ?? '1[0-9]{3}[2-9][0-9]{6}([,]{1,10}[0-9]+){0,1}'); | ||
| const regexForDn = new RegExp('^\\+?[0-9]{7,15}([,]{1,10}[0-9]+)?$'); |
There was a problem hiding this comment.
Honor tenant dial-number regex in validation
validateDialNumber now uses a single hardcoded pattern and no longer consumes the dialNumberRegex value passed through StationLoginComponentProps, so tenant-specific validation from cc?.agentConfig?.regexUS is effectively ignored. In deployments where the backend enforces a different format than ^\+?[0-9]{7,15}([,]{1,10}[0-9]+)?$, the UI will allow or reject numbers inconsistently with server rules, leading to avoidable station-login failures after submit.
Useful? React with 👍 / 👎.
COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-7303
This pull request addresses
< DESCRIBE THE CONTEXT OF THE ISSUE >
Dial number only accepts US numbers. Needs to accept international numbers as well.
Form validation was not disabling the save/signin button when fields were empty.
by making the following changes
Dial number regex has been changed to include international numbers so we can support prodeu rollout
Disabled attribute on save button has logic to validate empty fields
< DESCRIBE YOUR CHANGES >
Change Type
The following scenarios were tested
Testing was done with unit test scenarios as well as manual validation. Dial numbers other than US were entered and passed validation with + character optional. Dial numbers without country codes are not valid still. Empty fields such as missing team and missing dial number do not allow the save and sign in button to be enabled until they are completed.
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.