Skip to content

Conversation

@afuno
Copy link
Member

@afuno afuno commented Dec 26, 2025

No description provided.

- Updated `condition_for_*` methods to handle cases where `option.value` is nil, returning an invalid option status.
- Enhanced `message_for_*` methods to support dynamic translation keys based on validation reasons.
- Added new locale keys (`invalid_option`) to both English and Russian translation files to provide specific error messages for undefined `in` options.
- Updated regex patterns in `Format` to use `\A` and `\z` for stricter validation.
- Enhanced `validate` method in `Format` with `wrong_type` error for non-string inputs.
- Refactored `multiple_of` behavior to handle floating-point precision safely.
- Replaced redundant class checks with generic `Numeric` type for better clarity.
- Added new translation keys (`wrong_type`) in English and Russian locales for better error messaging.
- Introduced new examples under `Usual::DynamicOptions::MultipleOf` to validate floating-point divisors and internal assignments.
- Added detailed `Wrong::DynamicOptions::Format::WrongType` examples, covering invalid types for inputs, internals, and outputs.
- Expanded `Wrong::DynamicOptions::Inclusion` examples to handle nil and invalid `in` values across attributes.
- Included comprehensive RSpec tests for each example to ensure edge-case handling and improved error messaging consistency.
- Strengthened spec behavior expectations for invalid configurations and supported translations for error scenarios.
@afuno afuno self-assigned this Dec 26, 2025
@afuno afuno added the fix label Dec 26, 2025
@afuno afuno added this to the v.2.17.0 milestone Dec 26, 2025
- Refactored error messages in `Wrong::DynamicOptions::Inclusion` to improve clarity and consistency for missing `inclusion` values.
- Updated `message_for_*` methods to include `option_name` in error translations.
- Adjusted English and Russian locale keys to provide better specificity for invalid options.
- Enhanced related RSpec tests to verify updated error message content.
- Refined error messages for `invalid_option` across inputs, internals, and outputs to improve clarity.
- Updated Russian locale phrasing to better reflect missing option values in dynamic options validation scenarios.
- Ensured consistency in error messaging format across all attributes.
- Simplified `condition_for_*` methods in `Inclusion` by removing outdated RuboCop directives and improving code readability.
- Enhanced comments for better understanding of condition logic.
- Cleaned up trailing whitespace in `MultipleOf` spec examples for improved formatting and consistency.
- Ensured all changes align with existing validation and error messaging improvements.
@afuno afuno marked this pull request as ready for review December 26, 2025 13:58
@afuno afuno added feature and removed fix labels Dec 26, 2025
@afuno afuno merged commit db62ce3 into main Dec 26, 2025
37 checks passed
@afuno afuno deleted the feature/SRV-360/dynamic_options branch December 26, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants