-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Error message on Phone Input #10583
Fix: Error message on Phone Input #10583
Conversation
WalkthroughThe changes update the phone number validation logic across the codebase. Error messages in Cypress page objects have been modified from "Invalid input" to "Required." The forms in various components now use a Zod-based schema with an Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Form
participant Validator
participant Localization
User->>Form: Input phone number
Form->>Validator: Validate using Zod & isValidPhoneNumber
Validator-->>Form: Return validation result
alt Validation fails
Form->>Localization: Fetch "invalid_phone_number" message
Localization-->>Form: Return error message text
Form-->>User: Display error message
else Validation passes
Form-->>User: Proceed with submission
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
💤 Files with no reviewable changes (1)
🧰 Additional context used🧠 Learnings (2)cypress/pageObject/Users/UserCreation.ts (1)
src/components/Users/UserForm.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
🔇 Additional comments (12)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not do it this way. this is so much code duplication and we already have error message with different translation key for phone number validation
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit