-
Notifications
You must be signed in to change notification settings - Fork 27
fix!: Allow empty strings during parsing to not trigger required. Instead do .Min(1). #148
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
Conversation
WalkthroughThe changes introduce stricter validation logic and input handling across multiple test suites and supporting code. Tests now consistently use Changes
Sequence Diagram(s)sequenceDiagram
participant TestSuite
participant Schema
participant DataProvider
participant Validator
TestSuite->>Schema: Define schema (with required/min constraints)
TestSuite->>Validator: Parse(input: nil or empty)
Validator->>DataProvider: Get(key)
DataProvider-->>Validator: Return nil if key missing/empty
Validator->>Schema: Validate constraints (required/min)
Schema-->>Validator: Return error with code if invalid
Validator-->>TestSuite: Return error (checked by code)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (12)
🧰 Additional context used🧬 Code Graph Analysis (8)numbers_custom_test.go (1)
numbers_int64_test.go (1)
i18n/i18n_test.go (3)
numbers_test.go (1)
string_test.go (2)
string_custom_test.go (2)
pointers_test.go (1)
struct_test.go (8)
🔇 Additional comments (29)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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 (
|
Addresses #111
Summary by CodeRabbit
Bug Fixes
Tests