Skip to content

Conversation

@OlegPhenomenon
Copy link
Contributor

Enhanced SafeValueValidator to display the actual invalid characters in error messages, making it easier for users to identify and fix validation issues.

Changes:

  • Updated SafeValueValidator to extract and display invalid characters
  • Added new translation key (value_is_not_safe_with_chars) for EN and ET
  • Added tests to verify invalid characters are shown in error messages
  • Validation logic remains unchanged - only error messages improved

Affected models: User (given_names, surname) and BillingProfile (name, street, city, postal_code, vat_code)

Before: Generic message about allowed characters
After: Shows specific invalid characters like 'Contains invalid character(s): ,'

This addresses user feedback where validation errors were unclear, requiring trial-and-error to find problematic characters.

Enhanced SafeValueValidator to display the actual invalid characters
in error messages, making it easier for users to identify and fix
validation issues.

Changes:
- Updated SafeValueValidator to extract and display invalid characters
- Added new translation key (value_is_not_safe_with_chars) for EN and ET
- Added tests to verify invalid characters are shown in error messages
- Validation logic remains unchanged - only error messages improved

Affected models: User (given_names, surname) and BillingProfile
(name, street, city, postal_code, vat_code)

Before: Generic message about allowed characters
After: Shows specific invalid characters like 'Contains invalid character(s): ,'

This addresses user feedback where validation errors were unclear,
requiring trial-and-error to find problematic characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants